Form objects have neither a context, configuration nor dispatcher object. I don't see a clean way of implementing this.
The best option would be setter injection, but that seems like a suboptimal solution. Kris On May 16, 2009, at 19:20, "Jonathan H. Wage" <[email protected]> wrote: > Define a __call() method and notify the event there. Look at > sfComponent, I think it does it too. > > Sent from my iPhone > > On May 16, 2009, at 7:15 PM, Kris Wallsmith > <[email protected] > > wrote: > >> Where would you inject the event dispatcher? >> >> On May 16, 2009, at 17:37, Jonathan Wage <[email protected]> wrote: >> >>> ++ >>> >>> I do the same thing in Sympal myself now. It would be nice if >>> Symfony did this by itself. >>> >>> - Jon >>> >>> On Sat, May 16, 2009 at 7:41 AM, Matthias N. >>> <[email protected] >>> > wrote: >>> >>> Hi Kris, >>> >>> it looks good to me. The BaseForm concept is very nice for "project >>> coding". >>> >>> But it would be fantastic when you also added an method_not_found >>> event to one of the core classes, not sure which one. >>> That would allow a convenient way for plugins to plug in methods. >>> >>> For example I'm using a special i18n method to "turn on" cultures >>> and >>> I need it in almost all i18n forms of my plugins. >>> That would be much better to be able to automatically add the method >>> by a listener instead of having to force the user to copy some >>> code in >>> the BaseForm class. >>> >>> regards, >>> Matthias >>> >>> >>> On 16 Mai, 13:17, Kris Wallsmith <kris.wallsm...@symfony- >>> project.com> >>> wrote: >>> > I've added BaseForm and sfFormSymfony classes to the 1.3 branch. I >>> > considered branching 1.3 for this development, as it is in >>> progress, >>> > but decided against it since 1.3 is in active development. >>> > >>> > http://trac.symfony-project.org/changeset/18331 >>> > >>> > If this changeset looks good I will add an upgrade class for the >>> > necessary 1.2 to 1.3 upgrade changes. >>> > >>> > Thanks, >>> > Kris >>> > >>> > -- >>> > >>> > Kris Wallsmith | Community Manager >>> > [email protected] >>> > Portland, Oregon USA >>> > >>> > http://twitter.com/kriswallsmith >>> >>> >>> >>> >>> -- >>> Jonathan H. Wage (+1 415 992 5468) >>> Open Source Software Developer & Evangelist >>> sensiolabs.com | jwage.com | doctrine-project.org | symfony- >>> project.org >>> >>> >> >> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en -~----------~----~----~----~------~----~------~--~---
