zainstalowałem plugin KnpMenuBundle i robie prosty przykładzik, ale wywala mi błąd kiedy podaje np: 'route' => 'test', bez wprowadzenia wartości dla 'route' jest ok (tzn wyświetla menu, bez linków).
An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "test" as such route does not exist.") in src/Test/TextPageBundle/Resources/views/Default/menu.html.twig at line 2.
Kod dla src/Test/TextPageBundle/Menu/ Builder.php
namespace Test\TextPageBundle\Menu; use Knp\Menu\FactoryInterface; use Symfony\Component\DependencyInjection\ContainerAware; class Builder extends ContainerAware { { $menu = $factory->createItem('root'); // $menu->addChild('kontakt',array('route' => 'kontakt')); return $menu; } }