2017 © Pedro Peláez
 

symfony-bundle menu-bundle

This bundle provides services for defining static menus for sonata.

image

core23/menu-bundle

This bundle provides services for defining static menus for sonata.

  • Sunday, July 15, 2018
  • by core23
  • Repository
  • 0 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 29 % Grown

The README.md

NucleosMenuBundle

Latest Stable Version Latest Unstable Version License, (*1)

Total Downloads Monthly Downloads Daily Downloads, (*2)

Continuous Integration Code Coverage Type Coverage, (*3)

This bundle provides services for defining static menus for symfony applications., (*4)

Installation

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

composer require nucleos/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:, (*6)

// config/bundles.php

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

Usage

Create a configuration file called nucleos_menu.yaml:, (*7)

# config/packages/nucleos_menu.yaml

nucleos_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., (*8)

The Versions