/** * 初始化 */ protected function initialize() { parent::initialize(); //Prepend the application name to the title \Phalcon\Tag::prependTitle('Blog | '); $this->view->setTemplateAfter('common'); }
/** * 初始化 */ protected function initialize() { parent::initialize(); //Prepend the application name to the title \Phalcon\Tag::prependTitle('Blog | '); if ($this->checkIsLogin()) { $this->admin = $this->session->get('admin'); } else { $this->response->redirect('/login', true); } $this->view->setTemplateAfter('common'); }