Jan 16, 2014
It's relatively easy to customize FOSUserBundle behavior by creating your own child bundle, with FOSUserBundle as the parent. Once you've done this, you can provide your own registration and profile forms - as long as you remember all the small steps. This is intended first and foremost as a simple reminder of the steps involved. Code examples follow, but may or may not be exactly what you need. We will assume that you have created an MemberBundle, and declared it a child of FOSUserBundle. We'll demonstrate using the Registration form.
- copy the relevant FOSUserBundle twig template and Form class to MemberBundle
- ensure that FosUserBundle form type is included in MemberBundle's form class
- modify the code of MemberBundle form class
- register MemberBundle form as a service
- configure the fos_user block in app/config/config.yml