/** * Startup */ public function startup() { parent::startup(); $this->basePath = $this->getBasePath(); if ($this->name != 'Admin:Auth') { if (!$this->user->isLoggedIn()) { if ($this->user->getLogoutReason() === User::INACTIVITY) { $this->flashMessage('Session timeout, you have been logged out'); } $this->redirect('Auth:login', array('backlink' => $this->storeRequest())); } else { if (!$this->user->isAllowed($this->name, $this->action)) { $this->flashMessage('Access denied'); $this->redirect('Default:'); } } } // configure native components $adminModuleControlMap = array('~^pageMultiForm$~' => 'Components\\MultiForms', '~^[[:alnum:]]+Form$~' => 'AdminModule\\Forms', '~^[[:alnum:]]+DataGrid$~' => 'AdminModule\\DataGrids', '~^[[:alnum:]]+ConfirmDialog$~' => 'AdminModule\\Dialogs', '~^[[:alnum:]]+Sorter$~' => 'AdminModule\\Sorters'); $this->nativeControlMap = Arrays::mergeTree($this->nativeControlMap, $adminModuleControlMap); $this->setupUiComponents(); }
public function startup() { parent::startup(); // \PavelMaca\Captcha\CaptchaControl::register(); }