开发者

Apply a Form Schema Formatter to all forms?

开发者 https://www.devze.com 2023-01-06 04:42 出处:网络
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

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()

0

精彩评论

暂无评论...
验证码 换一张
取 消