Example #1
0
 /**
  * @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'));
         }
     }
 }
Example #3
0
File: Steps.php Project: acp3/core
 /**
  * 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;
 }
Example #4
0
 /**
  * @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;
 }
Example #5
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());
 }
Example #6
0
 /**
  * @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());
 }
Example #7
0
 /**
  * @inheritdoc
  */
 protected function applyTemplateAutomatically()
 {
     return $this->request->getModule() . '/' . ucfirst($this->request->getArea()) . '/' . $this->request->getController() . '.' . $this->request->getAction() . '.tpl';
 }
Example #8
0
 /**
  * @return string
  */
 protected function buildControllerServiceId()
 {
     return $this->request->getModule() . '.controller.' . $this->request->getArea() . '.' . $this->request->getController() . '.' . $this->request->getAction();
 }