Download the PHP package shegroup/menu-bundle without Composer
On this page you can find all versions of the php package shegroup/menu-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shegroup/menu-bundle
More information about shegroup/menu-bundle
Files in shegroup/menu-bundle
Package menu-bundle
Short Description This bundle provides a menu bundle for Symfony
License MIT
Informations about the package menu-bundle
MenuBundle
The MenuBundle means easy-to-implement and feature-rich menus in your Symfony application!
Installation
Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
This command requires you to have Composer installed globally, as explained
in the installation chapter of the Composer documentation.
Enable the Bundle
Then, enable the bundle by adding the following line in the app/AppKernel.php
file of your project:
Create your first menu
An example builder class would look like this:
The menu needs to implement MenuInterface. If you need to access the request information, your menu has to implement RequestAwareInterface as well.
Render
To actually render the menu, just do the following from anywhere in any template:
You can define your menu as a service. In order to do that, you need to tag your service with the 'she_group.menu' tag:
this tag is automatically added to all classes that implements MenuInterface when autoconfiguration is enabled.
In order to render it:
All versions of menu-bundle with dependencies
symfony/framework-bundle Version ^8.0
symfony/security-core Version ^8.0
symfony/twig-bundle Version ^8.0
symfony/options-resolver Version ^8.0