문제

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?

도움이 되었습니까?

해결책

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/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top