On Sun, Apr 17, 2011 at 12:34 PM, A A <kaupa...@gmail.com> wrote: > Thank you, guys! > > But maybe I'm too captious, but it doesn't seem to be convenient way to > implement 'beforeActionRun' for each controller. I registered > 'onControllerRequest' listener. But what should I do further: making switch > to define which controller was exactly requested and depending ion this make > other manipulations? What if I have 15 controllers in a bundle and need to > implement pre-launching operations for each of them?
This is a bit of a guess, but you might want to try implementing a service and registering it for onCoreController, then do $event->getController()->preAction() (or whatever function name you want...) , then you can implement those methods in the controllers that you need functionality in. A little fleshing out and it should be pretty easy to make pre/post action stuff on whatever level of granularity you need -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en