Knp\Bundle\MenuBundle\Templating\Helper\MenuHelper::get PHP Метод

get() публичный Метод

Retrieves an item following a path in the tree.
public get ( Knp\Menu\ItemInterface | string $menu, array $path = [], array $options = [] ) : Knp\Menu\ItemInterface
$menu Knp\Menu\ItemInterface | string
$path array
$options array
Результат Knp\Menu\ItemInterface
    public function get($menu, array $path = array(), array $options = array())
    {
        return $this->helper->get($menu, $path, $options);
    }

Usage Example

Пример #1
0
 public function testGetMenuWithOptions()
 {
     $menu = $this->getMock('Knp\\Menu\\ItemInterface');
     $helperMock = $this->getHelperMock();
     $helperMock->expects($this->any())->method('get')->with('default', array(), array('foo' => 'bar'))->will($this->returnValue($menu));
     $helper = new MenuHelper($helperMock, $this->getMatcherMock(), $this->getManipulatorMock());
     $this->assertSame($menu, $helper->get('default', array(), array('foo' => 'bar')));
 }
All Usage Examples Of Knp\Bundle\MenuBundle\Templating\Helper\MenuHelper::get