Apply a Form Schema Formatter to all forms?
I just crea开发者_如何学JAVAted a custom schema formatter by extending sfWidgetFormSchemaFormatter for my forms. However, what is sad to know is that to use it, I need to specify that in the configure() method of every form I use, which is kinda painful.
Writing this in the BaseForm is a good idea, but the problem is that ModelForm & BaseModelForm don't implicitly call the BaseForm :(
Is there a way out to do this generically?
All doctrine forms extend from BaseFormDoctrine you can put it in the setup method.
Make sure that if you overload setup() any where else to call self::parent()
精彩评论