KnpMenuBundle icon indicating copy to clipboard operation
KnpMenuBundle copied to clipboard

Implement a MenuBuilderProviderInterface to support autoconfiguration

Open stof opened this issue 7 years ago • 5 comments

This interface allows defining the menu names from the class itself instead of having to define them in the service definition. This is similar to the event subscriber vs event listener system in Symfony. The benefit of this interface is that the service definition can rely on autoconfiguration to register everything, which fits very well with the Flex way.

TODOs:

  • [ ] write tests

stof avatar Sep 16 '18 08:09 stof

@stof did you make any progress with tests here? Do you need some help with it?

garak avatar Sep 06 '19 15:09 garak

No progress, because I totally forgot that PR.

stof avatar Sep 06 '19 15:09 stof

hoping this PR will get merged and a new release is on the horizon 🌤

craigh avatar Jan 05 '20 02:01 craigh

Ehi @stof, sometimes I come back here to bother you about possible finalization of this old PR 😉 Any news?

garak avatar Oct 23 '20 14:10 garak

Rather than this MenuBuilderProviderInterface providing a static method returning a map of menu name to builder methods, I think a AsMenuBuilder attribute applied on methods will be better (and Symfony 5 supports that for autoconfiguration)

stof avatar Jan 21 '22 12:01 stof