What you can do is this: - you have a BaseUserForm which extends BaseForm, don't you? (or sfForm[Propel, Doctrine] when you're using symfony 1.2, doesn't matter) - UserForm extends BaseUserForm
- add another form called ExtendUserForm which extends BaseUserForm - change UserForm to extend ExtendUserForm What your users can do now is replace ExtendUserForm with their own things and you can use UserForm in you foobar module which does not have to overridden at all (apart from templates or such, if need be). First remark: remember to correctly wire all configure() and setup() methods to call parent::configure() and parent::setup() accordingly. Second remark: if you yourself need to at least provide some changes to your users (make email fields validate as email fields and not as string fields etc.) you'll have to insert another hierarchy between ExtendUserForm and BaseUserForm. Cheers, Daniel On 2009-12-11, at 11/December, 1:23 AM, Adrien Mogenet wrote: > Hi all, > > In my `main` application, let say I have a UserForm.class.php to > manage my Users. > This `main` application has a `foobar` module which displays a > UserForm instance. > > > Well, I want to offers to the developers a way to extend this UserForm > class by developing some plugins. Is there a clever way to extend > UserForm, without overriding the whole `foobar` module ? > > -- > Adrien > > -- > > You received this message because you are subscribed to the Google Groups > "symfony users" 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-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "symfony users" 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-users?hl=en.
