advanced reports dependency injection development environment frontend editing git javascript meetup php pixlr porthole purify queuedjobs rage silverstripe tidy ubuntu webservices wiki
I've added a new piece of code to the Queued Jobs module that allows you to quickly add scheduling to any data object.
It's very straight forward to add
Object::add_extension('MyDataObject', 'ScheduledExecutionExtension');In SilverStripe, users can select their locale, along with specifying a default date and time format to use. This should also be replicated throughout the site, but if you're forgetful like me, sometimes it won't display as expected. The secret? Making sure you set the user's preference for the request!
In Page_Controller::init() simply add
$member = Member::currentUser();
if(!empty($member->Locale)) i18n::set_locale($member->Locale);
if(!empty($member->DateFormat)) i18n::set_date_format($member->DateFormat);
if(!empty($member->TimeFormat)) i18n::set_time_format($member->TimeFormat);