PHPackages                             converia/config-knp-menu-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. converia/config-knp-menu-bundle

Abandoned → [jbouzekri/config-knp-menu-bundle](/?search=jbouzekri%2Fconfig-knp-menu-bundle)Symfony-bundle[Utility &amp; Helpers](/categories/utility)

converia/config-knp-menu-bundle
===============================

Configure your knp menus with yaml files accross your project bundles

v4.2.3(6y ago)0305MITPHP

Since May 17Pushed 1y agoCompare

[ Source](https://github.com/Converia/ConfigKnpMenuBundle)[ Packagist](https://packagist.org/packages/converia/config-knp-menu-bundle)[ Docs](https://github.com/Converia/ConfigKnpMenuBundle)[ RSS](/packages/converia-config-knp-menu-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (14)Used By (0)

ConfigKnpMenuBundle
===================

[](#configknpmenubundle)

[![Build Status](https://camo.githubusercontent.com/b0a33cca13612978da6bc2a85919f6c3054d4ee09238c322798d93b0b384448f/68747470733a2f2f7472617669732d63692e6f72672f6a626f757a656b72692f436f6e6669674b6e704d656e7542756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jbouzekri/ConfigKnpMenuBundle)[![SensioLabsInsight](https://camo.githubusercontent.com/8608fa9e16ea7ce51a38652780c7f4c852de62e9245d41b8dbe2e6291f3fa13d/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f30626133653265362d346239312d343838362d616138642d3436323065623234333834352f6d696e692e706e67)](https://insight.sensiolabs.com/projects/0ba3e2e6-4b91-4886-aa8d-4620eb243845)

Introduction
------------

[](#introduction)

This bundle provides a way to configure your knp menus in your bundles yml configuration.

For more information on knp menu, read :

- The [Knp Menu Documentation](https://github.com/KnpLabs/KnpMenu/blob/master/README.markdown)
- The [Knp Menu Bundle Documentation](https://github.com/KnpLabs/KnpMenuBundle/blob/master/README.md)

This bundle was inspired by the [OroNavigationBundle](https://github.com/orocrm/platform/tree/master/src/Oro/Bundle/NavigationBundle) in oro crm.

Installation
------------

[](#installation)

You can use composer for installation.

Add the repository to the composer.json file of your project and run the update or install command.

```
{
    "require": {
        "jbouzekri/config-knp-menu-bundle": "3.0.0"
    }
}
```

Then enable it in your AppKernel.php with the KnpMenuBundle :

```
$bundles = array(
    ...
    new Knp\Bundle\MenuBundle\KnpMenuBundle(),
    new Jb\Bundle\ConfigKnpMenuBundle\JbConfigKnpMenuBundle(),
);
```

Documentation
-------------

[](#documentation)

In order to use this bundle, you must define your menu configuration in a **navigation.yml** file in your bundle.

Example :

```
my_mega_menu:
    tree:
        first_level_item:
            label: My first label
            children:
                second_level_item:
                    label: My second level
```

It will configure a provider for knp menu factory. You can then use your my\_mega\_menu in twig as a classic knp menu :

```
{{ knp_menu_render('my_mega_menu') }}
```

Configuration
-------------

[](#configuration)

This is the available configuration definition for an item.

```
my_mega_menu:
    childrenAttributes: An array of attributes passed to the root ul tag
    tree:
        first_level_item:
            uri: "An uri. Use it if you do not define route parameter"
            route: "A sf2 route without @"
            routeParameters: "an array of parameters to pass to the route"
            label: "My first label"
            order: An integer to sort the item in his level.
            attributes: An array of attributes passed to the knp item
            linkAttributes: An array of attributes passed to the a tag
            childrenAttributes: An array of attributes passed to the chidlren block
            labelAttributes: An array of attributes passed to the label tag
            display: boolean to hide the item
            displayChildren: boolean to hide the children
            roles: array of item (string roles) passed to isGranted securityContext method to check if user has rights in menu items
            extras: An array of extra parameters (for example icon img, additional content etc.)
            children: # An array of subitems
                second_level_item:
                    label: My second level
```

This configuration matches the methods available in the Knp Menu Item class

Menu security
-------------

[](#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.

Issues
------

[](#issues)

- tree sub configuration property : In the navigation.yml file, you must defined a tree key below your menu name. It provides another level to keep the first level item key after configuration parsing. If someone know how to remove it, let me know.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 80.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~187 days

Recently: every ~304 days

Total

12

Last Release

2314d ago

Major Versions

1.0.1 → 2.0.02014-08-20

2.0.0 → 3.0.02014-10-24

3.0.0 → 4.0.02015-12-30

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7052906?v=4)[Ben](/maintainers/kampfq)[@kampfq](https://github.com/kampfq)

![](https://www.gravatar.com/avatar/6575189a6f9d26679036aa35fc014a3852b05a280a6c29a78caf3298a907d87f?d=identicon)[athanasius-kircher](/maintainers/athanasius-kircher)

---

Top Contributors

[![jbouzekri](https://avatars.githubusercontent.com/u/880996?v=4)](https://github.com/jbouzekri "jbouzekri (71 commits)")[![munkie](https://avatars.githubusercontent.com/u/102297?v=4)](https://github.com/munkie "munkie (11 commits)")[![Baachi](https://avatars.githubusercontent.com/u/833645?v=4)](https://github.com/Baachi "Baachi (2 commits)")[![ThomasKnapke](https://avatars.githubusercontent.com/u/849202?v=4)](https://github.com/ThomasKnapke "ThomasKnapke (2 commits)")[![bartlomiej-kwiatek-vml](https://avatars.githubusercontent.com/u/149397481?v=4)](https://github.com/bartlomiej-kwiatek-vml "bartlomiej-kwiatek-vml (1 commits)")[![netfarma](https://avatars.githubusercontent.com/u/1618812?v=4)](https://github.com/netfarma "netfarma (1 commits)")

---

Tags

symfonyknpuimenunavigationuser-interface

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/converia-config-knp-menu-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/converia-config-knp-menu-bundle/health.svg)](https://phpackages.com/packages/converia-config-knp-menu-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)[pumukit/pumukit

Media Portal

5714.0k36](/packages/pumukit-pumukit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
