Last active
July 15, 2016 21:28
-
-
Save sokil/a6b561ac42765a6a4581 to your computer and use it in GitHub Desktop.
Symfony Menu
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('bundleName.main_menu') }} |
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
bundleName.menu_builder: | |
class: Vendor\Package\Menu | |
arguments: | |
- @knp_menu.factory | |
- @translator | |
- @security.authorization_checker | |
- %kernel.root_dir%/config/menu.yml | |
bundleName.main_menu: | |
class: Knp\Menu\MenuItem | |
factory: [@bundleName.menu_builder, build] | |
arguments: ['main'] | |
tags: | |
- { name: knp_menu.menu, alias: bundleName.main_menu } | |
bundleName.bottom_menu: | |
class: Knp\Menu\MenuItem | |
factory: [@bundleName.menu_builder, build] | |
arguments: ['bottom'] | |
tags: | |
- { name: knp_menu.menu, alias: bundleName.bottom_menu } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment