/** * Displays "404: Not found" page * * @return string */ public function notFoundAction() { $this->loadSitePlugins(); $this->view->getBreadcrumbBag()->addOne('404'); $page = new VirtualEntity(); $page->setTitle($this->translator->translate('Page not found'))->setContent($this->translator->translate('Requested page doesn\'t exist'))->setSeo(false); // There's no need to set 404 status code here, as its handled by the router internally return $this->view->render('pages-404', array('page' => $page)); }
/** * Returns page's entity * * @return \Krystal\Stdlib\VirtualEntity */ private function getPage() { $entity = new VirtualEntity(); $entity->setTitle($this->translator->translate('Search results'))->setMetaDescription(null); return $entity; }