Esempio n. 1
0
 /**
  * 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);
 }
Esempio n. 2
0
 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';
     });
 }
Esempio n. 3
0
 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);
     }
 }
Esempio n. 4
0
 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'));
 }
Esempio n. 5
0
 public function registerListeners(Manager $manager)
 {
     $manager->registerListener('OnTemplateRender', array($this, 'injectAssets'));
 }
Esempio n. 6
0
 public function registerListeners(Manager $manager)
 {
     $manager->registerListener('DashboardStatistics', array($this, 'getStatistics'));
 }
Esempio n. 7
0
 public function registerListeners(Manager $manager)
 {
     $manager->registerListener('AdminTemplateLoaded', array($this, 'adminTemplateFunctions'));
     $manager->registerListener('PublicTemplateLoaded', array($this, 'publicTemplateFunctions'));
     $manager->registerListener('TemplateInit', array($this, 'templateInit'));
 }
Esempio n. 8
0
 public function registerListeners(Manager $manager)
 {
     $manager->registerListener('ContentPublished', array($this, 'addToSearchIndex'));
 }
Esempio n. 9
0
 public function registerListeners(Manager $manager)
 {
     $manager->registerListener('Response.Flush', array($this, 'injectAssets'));
 }