Message of the day:
Welcome. Latest release: https://www.silverstripe.org/download Community Forum: https://forum.silverstripe.org Features: https://forum.silverstripe.org/c/feature-ideas Archive: https://slackarchive.silverstripe.org
If you have any SilverStripe related questions, please supply the version of Framework you're using.
Did you flush? 🚽 =
Archive temporarily at https://archive.codingplayground.nl (redirect)
So... for a project, I'd like to subclass CalendarDateTime to CustomCalendarDateTime and add versioning. But in 3.2, Versioned assumes the base class. Is this bound to change in the future?
AllChildren() == ArrayList
Well it might work actually. But not in the way that I'd want. It would be doing all the filtering on the PHP-side.
Looks like it'd work
- $this->AllChildren()->filter('ClassName', 'BlogPost')->filter(array('FieldThatExistsonBlogPostOnly' => true));
No. It'd fall over because "FieldThatExistsonBlogPostOnly" doesn't exist on SiteTree.
in combo with
@Jae (SilbinaryWolf) Can't you just use something like
$this->AllChildren()->filter('ClassName', 'BlogPost'); ?
Like it just feels like the correct thing to do performance wise. Also allows the user use it like this and just go $this->stageChildren()->filter(array('FieldThatExistsonBlogPostOnly' => true));