Created
September 12, 2015 19:38
-
-
Save danielnv18/0b83fc81b1deb2089468 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ knp_menu_render('main') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knp_menu: | |
# use "twig: false" to disable the Twig extension and the TwigRenderer | |
twig: | |
template: knp_menu.html.twig | |
# if true, enables the helper for PHP templates | |
templating: false | |
# the renderer to use, list is also available by default | |
default_renderer: twig | |
services: | |
app.menu_builder: | |
class: AppBundle\Menu\MenuBuilder | |
arguments: ["@knp_menu.factory"] | |
app.main_menu: | |
class: Knp\Menu\MenuItem # the service definition requires setting the class | |
factory: ["@app.menu_builder", createMainMenu] | |
arguments: ["@request_stack"] | |
tags: | |
- { name: knp_menu.menu, alias: main } # The alias is what is used to retrieve the menu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment