示例#1
0
文件: Title.php 项目: acp3/core
 /**
  * @return string
  */
 public function getPageTitle()
 {
     if (empty($this->pageTitle)) {
         $steps = $this->steps->getBreadcrumb();
         $lastCrumb = end($steps);
         $this->pageTitle = $lastCrumb['title'];
     }
     return $this->pageTitle;
 }
示例#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);
         }
     }
 }
示例#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));
 }