diff options
Diffstat (limited to 'public/catalog/controller/startup/event.php')
-rw-r--r-- | public/catalog/controller/startup/event.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/public/catalog/controller/startup/event.php b/public/catalog/controller/startup/event.php new file mode 100644 index 0000000..dc42816 --- /dev/null +++ b/public/catalog/controller/startup/event.php @@ -0,0 +1,13 @@ +<?php +class ControllerStartupEvent extends Controller { + public function index() { + // Add events from the DB + $this->load->model('setting/event'); + + $results = $this->model_setting_event->getEvents(); + + foreach ($results as $result) { + $this->event->register(substr($result['trigger'], strpos($result['trigger'], '/') + 1), new Action($result['action']), $result['sort_order']); + } + } +}
\ No newline at end of file |