Ejemplo n.º 1
0
 protected function addToMenu(ItemInterface $menu, $path, PageInterface $page)
 {
     $this->triggerEvent('navigationAddToMenuBefore', array('navigation' => $this, 'page' => $page, 'menu' => $menu, 'path' => &$path));
     $menu->addChild($path);
     if (!$page->isDir()) {
         $menu[$path]->setUri('/' . $page->getPath());
     }
     $this->setMenuAttributes('child', $menu[$path]);
     $this->setMenuAttributes('link', $menu[$path]);
     $this->setMenuAttributes('label', $menu[$path]);
     $this->triggerEvent('navigationAddToMenuAfter', array('navigation' => $this, 'page' => $page, 'menu' => $menu, 'path' => &$path));
 }
Ejemplo n.º 2
0
 public function add(PageInterface $page)
 {
     $this->pages[$page->getPath()] = $page;
 }