On 21.06.2011 10:47, Christophe COEVOET wrote: > Le 21/06/2011 10:46, Christophe COEVOET a écrit : >> Le 21/06/2011 10:43, Ваня Масич a écrit : >>> I read in symfony documentation "*How to extend a Class without using >>> Inheritance*" >>> http://symfony.com/doc/current/cookbook/event_dispatcher/class_extension.html >>> and >>> now thinking about how extend controller in bundle using event >>> dispatcher. First I think where I need put *addListener* with new >>> methods, so when run non-existent controller method in bundle, it >>> should already know that I had extend it. In mind there is one thing >>> to put this in AppKernel->registerBundles() method, maybe as some >>> parameter of bundle main class contructor. Help me develop the idea. >>> >>> Sorry for my English. >> The best way to register a listener, keeping it lazy-loaded, is to >> define a service and to tag it with the /kernel.listener/ tag to >> register it in the event dispatcher. See >> http://symfony.com/doc/current/reference/dic_tags.html#enabling-custom-listeners > I just saw that the doc is incomplete here. There is 2 mandatory > attributes for this tag: the event and the method.
Yup, my event PR [1] addresses that, but it'll be merged in a bit when I finish other things [1] https://github.com/symfony/symfony-docs/pull/425 Cheers -- Jordi Boggiano @seldaek - http://nelm.io/jordi -- 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