isNotSafeRequest()) { $this->checkHttpReferer(); $this->checkCsrfToken(); } $this->checkRateLimit(); $this->seo = $this->getSiteSeo(); $this->site = $this->getSiteSettings(); $this->nav = $this->getNavList(); $this->authUser = $this->getAuthUser(); return true; } public function initialize() { $this->seo->setTitle($this->site->title); $this->view->setVar('seo', $this->seo); $this->view->setVar('site', $this->site); $this->view->setVar('nav', $this->nav); $this->view->setVar('auth_user', $this->authUser); } protected function getAuthUser() { /** * @var WebAuth $auth */ $auth = $this->getDI()->get('auth'); return $auth->getAuthInfo(); } protected function getNavList() { $cache = new NavTreeListCache(); return $cache->get(); } protected function getSiteSettings() { $cache = new SettingCache(); return $cache->get('site'); } protected function getSiteSeo() { return new SiteSeo(); } }