Skip to content
This bundle provides services for defining static menus for sonata.
PHP Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
src
tests
vendor-bin
.editorconfig
.gitattributes
.gitignore
.kodiak.toml
.php_cs.dist
.rmt.yml
.travis.yml
CHANGELOG
LICENSE.md
Makefile
README.md
composer.json
phpstan.neon.dist
phpunit.xml.dist

README.md

MenuBundle

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Build Status Scrutinizer Code Quality Code Climate Coverage Status

This bundle provides services for defining static menus for sonata.

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

composer require core23/menu-bundle

Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    Core23\MenuBundle\Core23MenuBundle::class => ['all' => true],
];

Usage

Create a configuration file called core23_menu.yaml:

# config/packages/core23_menu.yaml

core23_menu:
    groups:
        // Header menu
        header:
            name: 'Header'
            attributes:
                id: 'header-nav'
                
        // Footer menu                
        footer:
            name: 'Footer'
            
        // Main menu
        main:
            name: 'Main'
            attributes:
                class: 'nav navbar-nav'
            items:
                home:
                    label: 'Home'
                    icon: 'fa fa-home'
                    route: 'app_home'
                    routeParams: { path: '/' }
                downloads:
                    label: 'Download'
                    route: 'app_download_index'
                event:
                    label: 'Event'
                    route: 'app_event_index'
                    // Submenu items
                    children:
                        venue:
                            label: 'Venue'
                            route: 'app_venue_index'

License

This bundle is under the MIT license.

You can’t perform that action at this time.