示例#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);
     });
 }
示例#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();
 }