public function beforeMethod() { $this->mUsers = new mUsers(); $this->auth = new Auth($this->mUsers, $this->config); if (Dragon::$method != 'login' && !$this->auth->check()) { $this->router->redirect($this->config->get('project_host')); } parent::beforeMethod(); $this->view->setLayout('default'); Assets::add('main', Assets::TYPE_CSS); Assets::add('default', Assets::TYPE_JS); }
/** * Some action before any method */ public function beforeMethod() { parent::beforeMethod(); //layout stranky $this->view->setLayout('default'); }