/** * Initialization controller * */ public function init() { parent::init(); if ($this->_authenticated) { $this->_breadcrumbs->addStep($this->Translate('Ваш профиль'), $this->getUrl(null, 'account')); } }
/** * Event before dispatching * * @return void */ public function preDispatch() { // call parent method to perform standard predispatch tasks parent::preDispatch(); // retrieve request object so we can access requested user and action $request = $this->getRequest(); // check if already dispatching the user not found action. if we are // then we don't want to execute the remainder of this method if (strtolower($request->getActionName()) == 'usernotfound') { return; } // retrieve username from request and clean the string $username = trim($request->getUserParam('username')); // if no username is present, redirect to site home page if (strlen($username) == 0) { //$this->_redirect($this->getUrl('index', 'index')); $this->_redirect('/index/index'); } // load the user, based on username in request. if the user record // is not loaded then forward to notFoundAction so a 'user not found' // message can be shown to the user. $this->user = new Default_Model_DbTable_User($this->db); if (!$this->user->loadByUsername($username)) { $this->_forward('usernotfound'); return; } // Add a link to the breadcrumbs so all actions in this controller // link back to the user home page $this->_breadcrumbs->addStep($this->Translate('Автор') . '-' . $this->user->username, $this->getCustomUrl(array('username' => $this->user->username, 'action' => 'index'), 'user')); // Make the user data available to all templates in this controller $this->view->user = $this->user; $this->view->username = $this->user->username; }
/** * Initialization controller * */ public function init() { parent::init(); // Получим название таблицы $params = $this->_request->getParams(); if (isset($params['table'])) { $table = $params['table']; $arrTable = explode('.', $table); $this->_table = $arrTable[1]; } }
/** * Initialization controller * */ public function init() { parent::init(); $this->_breadcrumbs->addStep($this->Translate('Конфигурирование'), $this->getUrl(null, 'config', 'admin')); }
/** * Initialization controller * */ public function init() { parent::init(); }
/** * Initialization controller * */ public function init() { parent::init(); $this->_breadcrumbs->addStep($this->Translate('Инструменты'), $this->getUrl(null, 'tools', 'admin')); }
/** * Initialization controller * * @return void */ public function init() { parent::init(); $this->_flashMessenger = $this->_helper->getHelper('FlashMessenger'); $this->initView(); }
/** * Initialization controller * */ public function init() { parent::init(); $this->_breadcrumbs->addStep($this->Translate('Ваш профиль'), $this->getUrl(null, 'account')); $this->_breadcrumbs->addStep($this->Translate('Управление блогом'), $this->getUrl(null, 'blogmanager')); }