Download the PHP package diabl0/config-knp-menu-bundle without Composer
On this page you can find all versions of the php package diabl0/config-knp-menu-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download diabl0/config-knp-menu-bundle
More information about diabl0/config-knp-menu-bundle
Files in diabl0/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/diabl0/ConfigKnpMenuBundle
Informations about the package config-knp-menu-bundle
ConfigKnpMenuBundle
Introduction
This bundle provides a way to configure your knp menus via yaml configuration file.
For more information on knp menu, read :
This bundle was inspired by the OroNavigationBundle and jbouzekri/ConfigKnpMenuBundle
Installation
You can use composer for installation.
Documentation
In order to use this bundle, you must define your menu configuration in a navigation.yaml file in your configs (usually /config/packages/navigation.yaml). If you are using Flex, this config is created for you.
format :
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.
Breadcrumbs
Simple example:
All versions of config-knp-menu-bundle with dependencies
symfony/event-dispatcher Version ^4.0 | ^5.0
symfony/yaml Version ^4.0 | ^5.0