/** * @return array */ public function getNavigation() { if ($this->navigationCache->isEnabled()) { return $this->navigationCache->getNavigation(); } return $this->navigationCollector->getNavigation(); }
/** * @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]; }
/** * @return void */ public function writeNavigationCache() { $navigation = $this->navigationCollector->getNavigation(); $this->navigationCache->setNavigation($navigation); }