/** * Trigger a set of event handlers, if present. * @param $event * @param $data * @return bool */ public static function trigger($event, &$data) { if (!isset(self::$manager)) { self::init(); } return self::$manager->triggerEvent($event, $data); }
public function registerListeners(Manager $manager) { $manager->registerListener('RegisterJobHandlers', function (&$handlers) { $handlers[] = 'Octo\\System\\JobHandler\\UpdateTimelineHandler'; $handlers[] = 'Octo\\System\\JobHandler\\SendEmailHandler'; $handlers[] = 'Octo\\System\\JobHandler\\SchedulerHandler'; }); }
public function registerListeners(Manager $manager) { $config = Config::getInstance()->get('Octo.Azure.BlobStorage'); if (is_array($config) && array_key_exists('ConnectionString', $config)) { if (array_key_exists('Container', $config)) { $this->container = $config['Container']; } $manager->registerListener('GetFile', array($this, 'getFile'), false); $manager->registerListener('PutFile', array($this, 'putFile'), false); } }
public function registerListeners(Manager $manager) { $manager->registerListener('Template.Loaded', array($this, 'templateLoaded')); $manager->registerListener('Template.Loaded.Public', array($this, 'publicTemplateLoaded')); $manager->registerListener('Template.Loaded.Admin', array($this, 'adminTemplateLoaded')); $manager->registerListener('TemplateInit', array($this, 'templateInit')); // Legacy admin templates: $manager->registerListener('AdminTemplateLoaded', array($this, 'adminTemplateFunctions')); }
public function registerListeners(Manager $manager) { $manager->registerListener('OnTemplateRender', array($this, 'injectAssets')); }
public function registerListeners(Manager $manager) { $manager->registerListener('DashboardStatistics', array($this, 'getStatistics')); }
public function registerListeners(Manager $manager) { $manager->registerListener('AdminTemplateLoaded', array($this, 'adminTemplateFunctions')); $manager->registerListener('PublicTemplateLoaded', array($this, 'publicTemplateFunctions')); $manager->registerListener('TemplateInit', array($this, 'templateInit')); }
public function registerListeners(Manager $manager) { $manager->registerListener('ContentPublished', array($this, 'addToSearchIndex')); }
public function registerListeners(Manager $manager) { $manager->registerListener('Response.Flush', array($this, 'injectAssets')); }