public function testGetMenuByPath() { $menu = $this->getMock('Knp\\Menu\\ItemInterface'); $helper = $this->getHelperMock(array('get')); $helper->expects($this->once())->method('get')->with('default', array('child'))->will($this->returnValue($menu)); $extension = new MenuExtension($helper); $this->assertSame($menu, $extension->get('default', array('child'))); }
public function navbarmenu($menu, array $options = array(), $renderer = null) { $options['class'] = 'navbar-nav'; $options['currentClass'] = 'active'; $options['template'] = 'BaikalViewComponentsBundle:Menu:topmenu.html.twig'; return parent::render($menu, $options, $renderer); }
public function adminlte_leftmenu_render($menu, array $options = array(), $renderer = null) { $options['template'] = 'NetgustoAdminLTEBundle:LeftMenu:knp_menu.html.twig'; return parent::render($menu, $options, $renderer); }