Download the PHP package converia/config-knp-menu-bundle without Composer
On this page you can find all versions of the php package converia/config-knp-menu-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download converia/config-knp-menu-bundle
More information about converia/config-knp-menu-bundle
Files in converia/config-knp-menu-bundle
Package config-knp-menu-bundle
Short Description Configure your knp menus with yaml files accross your project bundles
License MIT
Homepage https://github.com/Converia/ConfigKnpMenuBundle
Informations about the package config-knp-menu-bundle
ConfigKnpMenuBundle
Introduction
This bundle provides a way to configure your knp menus in your bundles yml configuration.
For more information on knp menu, read :
This bundle was inspired by the OroNavigationBundle in oro crm.
Installation
You can use composer for installation.
Add the repository to the composer.json file of your project and run the update or install command.
Then enable it in your AppKernel.php with the KnpMenuBundle :
Documentation
In order to use this bundle, you must define your menu configuration in a navigation.yml file in your bundle.
Example :
It will configure a provider for knp menu factory. You can then use your my_mega_menu in twig as a classic knp menu :
Configuration
This is the available configuration definition for an item.
This configuration matches the methods available in the Knp Menu Item class
Menu security
Security context is injected in menu item provider.
For root menu item, display or hide it in your twig template. For children items, if you didn't add the roles key, they will be displayed. Else it will passed the array of key to the isGranted method and check if you have rights on the the item.
Issues
- tree sub configuration property : In the navigation.yml file, you must defined a tree key below your menu name. It provides another level to keep the first level item key after configuration parsing. If someone know how to remove it, let me know.
All versions of config-knp-menu-bundle with dependencies
symfony/event-dispatcher Version ^4.0
symfony/security-bundle Version ^4.0
symfony/yaml Version ^4.0