Esempio n. 1
0
 private function loadNavigationFromCache($navigationId)
 {
     return $this->cache->load("nav-{$navigationId}", function (&$dependencies) use($navigationId) {
         $nodes = $this->navigationReader->getEntireNavigation($navigationId);
         return $this->treeBuilder->buildTree($nodes);
     });
 }
Esempio n. 2
0
 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();
 }