private function loadNavigationFromCache($navigationId) { return $this->cache->load("nav-{$navigationId}", function (&$dependencies) use($navigationId) { $nodes = $this->navigationReader->getEntireNavigation($navigationId); return $this->treeBuilder->buildTree($nodes); }); }
public function getRenderedNavigation($navigationId) { $template = $this->templateFactory->createTemplate(); $template->setFile(__DIR__ . '/navigation.latte'); $nodes = $this->navigationReader->getEntireNavigation($navigationId); $rootNode = $this->treeBuilder->buildTree($nodes); $template->node = $rootNode; return $template->__toString(); }