aboutsummaryrefslogtreecommitdiffstats
path: root/public/admin/controller/startup/event.php
blob: 2aa9604bd131621b6f1169da2d34d61a9e371a5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?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) {
			if ((substr($result['trigger'], 0, 6) == 'admin/') && $result['status']) {
				$this->event->register(substr($result['trigger'], 6), new Action($result['action']), $result['sort_order']);
			}
		}		
	}
}