I have set up the UserBundle and everything works fine. Now, instead of modifying the UserBundle views and FormTypes, I’d like to override them.
For the views, no problem, I just followed the Symfony2 doc: http://symfony.com/doc/2.0/book/templating.html#overriding-bundle-templates
So the views are in app/Resources/…..
But I don’t know how to override a FormType from my own Bundle. For instance, I have a User entity that extends the FOSUserBundle User entity and adds many fields to it and I want to display them in the view.
The issue is that the default RegistrationFormType does not have these fields, and adding them straight into this file would go against the logic of overriding and extending the FOSUserBundle.
PS: I’m using Symfony2 RC3
You can set configuration values for the forms, classes and options used by FOSUserBundle in your config.yml file. Check out
FOS\UserBundle\DependencyInjection\Configurationfor all the values that the bundle allows you to configure.To answer your specific question, in your config.yml file: