Exemple #1
0
 /**
  * @return string
  */
 public function getPageTitle()
 {
     if (empty($this->pageTitle)) {
         $steps = $this->steps->getBreadcrumb();
         $lastCrumb = end($steps);
         $this->pageTitle = $lastCrumb['title'];
     }
     return $this->pageTitle;
 }
Exemple #2
0
 /**
  * Sets the breadcrumb steps cache for frontend action requests
  */
 protected function buildBreadcrumbCacheForFrontend()
 {
     parent::buildBreadcrumbCacheForFrontend();
     if (!empty($this->stepsFromDb)) {
         $this->breadcrumbCache = $this->stepsFromDb;
         if ($this->breadcrumbCache[count($this->breadcrumbCache) - 1]['uri'] === $this->steps[0]['uri']) {
             $steps = $this->steps;
             unset($steps[0]);
             $this->breadcrumbCache = array_merge($this->breadcrumbCache, $steps);
         }
     }
 }
Exemple #3
0
 /**
  * @inheritdoc
  */
 protected function addCustomTemplateVarsBeforeOutput()
 {
     $this->view->assign('BREADCRUMB', $this->breadcrumb->getBreadcrumb());
     $this->view->assign('LAYOUT', $this->fetchLayoutViaInheritance());
     $this->eventDispatcher->dispatch('core.controller.custom_template_variable', new Core\Controller\Event\CustomTemplateVariableEvent($this->view));
 }