public function requireLoginAction() { $this->initLayout(); /** @var core_block_page $page */ $login = new core_block('page/login/form.phtml'); $loginData = $this->getRequest()->getParam('login', null); if (is_array($loginData)) { $login->setVar('error', 'Неверное имя пользователя или пароль'); } $this->getLayout()->getPageBlock()->addChild('head', new core_block_head()); $this->getLayout()->getPageBlock()->addChild('root', $login); $this->renderLayout(); }
public function __construct($template = null) { parent::__construct(self::DEFAULT_PAGE); $this->addChild('head', new core_block_head()); $this->addChild('header', new core_block_header()); $this->addChild('messages', new core_block_messages()); $this->addChild('footer', new core_block_footer()); }
public function add_block() { $form = core_block::get_add_block_form(); if ($form->validate()) { list($module_name, $block_id) = explode(":", $form->add_block->id->value); $available = block_manager::get_available(); if ($form->add_block->center->value) { block_manager::add("dashboard_center", $module_name, $block_id); message::success(t("Added <b>%title</b> block to the dashboard center", array("title" => $available["{$module_name}:{$id}"]))); } else { block_manager::add("dashboard_sidebar", $module_name, $block_id); message::success(t("Added <b>%title</b> to the dashboard sidebar", array("title" => $available["{$module_name}:{$id}"]))); } } url::redirect("admin/dashboard"); }
protected function _initVars() { parent::_initVars(); $activity = new manage_model_activity(); $this->setVar('activities', $activity->getCollection()); $city = new manage_model_city(); $this->setVar('cities', $city->getCollection()); $user = new manage_model_user(); $traders_collection = $user->getCollection(); $traders_collection->addRoleFilter(manage_model_role::ROLE_AGENT); $this->setVar('traders', $traders_collection); $filter = $this->getVar('filter'); if (!isset($filter['date'])) { $dateFrom = date('U') - 60 * 60 * 24 * 7; $dateTo = (int) date('U'); $this->setFilterVar('date', array('from' => $dateFrom, 'to' => $dateTo)); } }
protected function _init() { parent::_init(); $this->setTemplate('manage.phtml'); }
protected function _addChild($name, core_block $child_block) { $this->_wrapper->addChild($name, $child_block); return $this; }
public function __construct() { parent::__construct('main.phtml'); }
protected function _init() { parent::_init(); $this->setTemplate('page/head.phtml'); }
public function __construct() { parent::__construct('flowze.phtml'); }
public function __construct() { parent::__construct('map/marker/content.phtml'); }
protected function _initVars() { parent::_initVars(); }
public function __construct() { parent::__construct('page/messages.phtml'); }
public function __construct() { parent::__construct('ticket/add.phtml'); }