/** * @return string */ public function getDetails() { if ($this->details === null) { $pageTitle = $this->stringFormatter->makeStringUrlSafe($this->title->getPageTitle()); $this->details = $this->request->getModule() . '-' . $this->request->getController() . '-' . $pageTitle; } return $this->details; }
/** * @param \ACP3\Core\Breadcrumb\Title $title */ private function addPageTitlePostfix(Title $title) { if ($this->request->getModule() !== 'acp') { if (!empty($title->getPageTitlePostfix())) { $title->setPageTitlePostfix($title->getPageTitlePostfix() . $title->getPageTitleSeparator() . $this->translator->t('acp', 'acp')); } else { $title->setPageTitlePostfix($this->translator->t('acp', 'acp')); } } }
/** * Sets the breadcrumb steps cache for frontend action requests */ protected function buildBreadcrumbCacheForFrontend() { if (empty($this->steps)) { $this->append($this->translator->t($this->request->getModule(), $this->request->getModule()), $this->request->getModule()); $this->appendControllerActionBreadcrumbs(); } $this->breadcrumbCache = $this->steps; }
/** * @param string $menu * * @return int */ protected function selectMenuItem($menu) { if ($this->request->getArea() !== Core\Controller\AreaEnum::AREA_ADMIN) { $in = [$this->request->getQuery(), $this->request->getUriWithoutPages(), $this->request->getFullPath(), $this->request->getModuleAndController(), $this->request->getModule()]; return $this->menuItemRepository->getLeftIdByUris($menu, $in); } return 0; }
/** * Returns the SEO robots setting for the current page * * @return string */ public function getPageRobotsSetting() { $robots = $this->getRobotsSetting($this->request->getUriWithoutPages()); if (empty($robots)) { $robots = $this->getRobotsSetting($this->request->getFullPath()); } if (empty($robots)) { $robots = $this->getRobotsSetting($this->request->getModule()); } return strtolower(!empty($robots) ? $robots : $this->getRobotsSetting()); }
/** * @inheritdoc */ protected function addCustomTemplateVarsBeforeOutput() { $this->view->assign('PAGE_TITLE', $this->translator->t('install', 'acp3_installation')); $this->view->assign('TITLE', $this->translator->t($this->request->getModule(), $this->request->getController() . '_' . $this->request->getAction())); $this->view->assign('LAYOUT', $this->request->isXmlHttpRequest() ? 'layout.ajax.tpl' : $this->getLayout()); }
/** * @inheritdoc */ protected function applyTemplateAutomatically() { return $this->request->getModule() . '/' . ucfirst($this->request->getArea()) . '/' . $this->request->getController() . '.' . $this->request->getAction() . '.tpl'; }
/** * @return string */ protected function buildControllerServiceId() { return $this->request->getModule() . '.controller.' . $this->request->getArea() . '.' . $this->request->getController() . '.' . $this->request->getAction(); }