Search code examples
symfonyknpmenubundle

KnpMenuBundle menu items from multiple bundles


Is it possible to obtain menu items from multiple bundles with the KnpMenuBundle?

As for now I've been working with the service but that's overwritten if you declare it in multiple bundles. I read something about the custom providers https://github.com/KnpLabs/KnpMenuBundle/blob/master/Resources/doc/custom_provider.md but I'm not quite sure if that is what I'm looking for.

Just to sketch the / a situation: 2 bundles with their own menu items which need to be loaded in the same menu.


Solution

  • I facing the same problem. After reading in in that matter i guess using events is the way to go.

    see http://symfony.com/doc/current/bundles/KnpMenuBundle/events.html for detail information.

    (sorry, way to much information to provide it directly in the answer.)