public function __construct($request) { parent::__construct($request); $this->target_controller = $this->request->get('target_controller'); $this->target_subject = $this->request->get('target_subject'); $this->target_id = $this->request->get('target_id'); }
public function parseRoute($uri) { $action_name = parent::parseRoute($uri); if (!$action_name && $this->cms_config->ctype_default) { $action_name = parent::parseRoute($this->cms_config->ctype_default . '/' . $uri); } return $action_name; }
public function parseRoute($uri) { $config = cmsConfig::getInstance(); $action_name = parent::parseRoute($uri); if (!$action_name && $config->ctype_default) { $action_name = parent::parseRoute($config->ctype_default . '/' . $uri); } return $action_name; }
public function before($action_name) { if (!cmsUser::isAdmin()) { cmsCore::error404(); } parent::before($action_name); $template = cmsTemplate::getInstance(); $template->setLayout('admin'); $template->setMenuItems('cp_main', $this->getAdminMenu()); }
public function before($action_name) { if (!cmsUser::isAdmin()) { cmsCore::error404(); } if (!$this->isAllowByIp()) { cmsCore::error404(); } parent::before($action_name); $this->cms_template->setLayout('admin'); $this->cms_template->setMenuItems('cp_main', $this->getAdminMenu()); }
/** * Все запросы могут быть выполнены только авторизованными и только по аякс * @param type $action_name */ public function before($action_name) { parent::before($action_name); if (!$this->request->isInternal()) { if (!$this->request->isAjax()) { cmsCore::error404(); } if (!cmsUser::isLogged()) { cmsCore::error404(); } } return true; }
public function getOptions() { $options = parent::getOptions(); if (!empty($options['no_redirect_list'])) { $no_redirect_list = explode("\n", $options['no_redirect_list']); $options['no_redirect_list_array'] = array_map(function ($val) { return trim($val); }, $no_redirect_list); } if (!empty($options['black_list'])) { $black_list = explode("\n", $options['black_list']); $options['black_list_array'] = array_map(function ($val) { return trim($val); }, $black_list); } if (!empty($options['white_list'])) { $white_list = explode("\n", $options['white_list']); $options['white_list_array'] = array_map(function ($val) { return trim($val); }, $white_list); } return $options; }
public function __construct($request) { parent::__construct($request); $this->images_controller = cmsCore::getController('images'); }