Question

I want to perform action on service (Menu service) while bundle registers itself in app. Symfony register all bundles on every request, so there should be an option to perform some actions as that time.

Any suggestions?

Était-ce utile?

La solution

Not really sure what you mean, but you can use some kernel events to do some customisation. Have look at the: http://symfony.com/doc/current/book/internals.html#kernel-request-event

Or, you can do some action during the service compilation using the CompilerPass. Here's an explaination about the COmpiler PASs: http://richardmiller.co.uk/2012/02/15/symfony2-service-container-compiler-passes/

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top