Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nucleos/nucleosmenubundle

🔗 This bundle provides services for defining static menus for symfony applications.
https://github.com/nucleos/nucleosmenubundle

bundle generator hacktoberfest knpmenu menu php sonata sonata-block symfony symfony-bundle

Last synced: 4 months ago
JSON representation

🔗 This bundle provides services for defining static menus for symfony applications.

Awesome Lists containing this project

README

        

NucleosMenuBundle
=================
[![Latest Stable Version](https://poser.pugx.org/nucleos/menu-bundle/v/stable)](https://packagist.org/packages/nucleos/menu-bundle)
[![Latest Unstable Version](https://poser.pugx.org/nucleos/menu-bundle/v/unstable)](https://packagist.org/packages/nucleos/menu-bundle)
[![License](https://poser.pugx.org/nucleos/menu-bundle/license)](LICENSE.md)

[![Total Downloads](https://poser.pugx.org/nucleos/menu-bundle/downloads)](https://packagist.org/packages/nucleos/menu-bundle)
[![Monthly Downloads](https://poser.pugx.org/nucleos/menu-bundle/d/monthly)](https://packagist.org/packages/nucleos/menu-bundle)
[![Daily Downloads](https://poser.pugx.org/nucleos/menu-bundle/d/daily)](https://packagist.org/packages/nucleos/menu-bundle)

[![Continuous Integration](https://github.com/nucleos/MenuBundle/actions/workflows/continuous-integration.yml/badge.svg?event=push)](https://github.com/nucleos/MenuBundle/actions?query=workflow%3A"Continuous+Integration"+event%3Apush)
[![Code Coverage](https://codecov.io/gh/nucleos/NucleosMenuBundle/graph/badge.svg)](https://codecov.io/gh/nucleos/NucleosMenuBundle)
[![Type Coverage](https://shepherd.dev/github/nucleos/NucleosMenuBundle/coverage.svg)](https://shepherd.dev/github/nucleos/NucleosMenuBundle)

This bundle provides services for defining static menus for symfony applications.

## 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 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:

```php
// config/bundles.php

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

## Usage

Create a configuration file called `nucleos_menu.yaml`:

```yaml
# 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](LICENSE.md).