コード例 #1
0
 /**
  * @return array
  */
 public function getNavigation()
 {
     if ($this->navigationCache->isEnabled()) {
         return $this->navigationCache->getNavigation();
     }
     return $this->navigationCollector->getNavigation();
 }
コード例 #2
0
 /**
  * @param string $pathInfo
  *
  * @return array
  */
 public function build($pathInfo)
 {
     $navigationPages = $this->navigationCollector->getNavigation();
     $menu = $this->menuFormatter->formatMenu($navigationPages, $pathInfo);
     $breadcrumb = $this->menuFormatter->formatMenu($navigationPages, $pathInfo, true);
     $path = $this->pathExtractor->extractPathFromMenu($breadcrumb);
     return [self::MENU => $menu, self::PATH => $path];
 }
コード例 #3
0
 /**
  * @return void
  */
 public function writeNavigationCache()
 {
     $navigation = $this->navigationCollector->getNavigation();
     $this->navigationCache->setNavigation($navigation);
 }