RegistrationFormType.php 808B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Muzich\UserBundle\Form\Type;
  3. use Symfony\Component\Form\FormBuilderInterface;
  4. use FOS\UserBundle\Form\Type\RegistrationFormType as BaseType;
  5. class RegistrationFormType extends BaseType
  6. {
  7. public function buildForm(FormBuilderInterface $builder, array $options)
  8. {
  9. parent::buildForm($builder, $options);
  10. $builder->add('token', 'text', array(
  11. //"property_path" => false UPGRADE 2.1
  12. 'mapped' => false,
  13. ));
  14. $builder->add('cgu_accepted', 'checkbox', array(
  15. 'required' => true
  16. ));
  17. $builder->add('mail_newsletter', 'checkbox', array(
  18. 'required' => false
  19. ));
  20. $builder->add('mail_partner', 'checkbox', array(
  21. 'required' => false
  22. ));
  23. }
  24. public function getName()
  25. {
  26. return 'muzich_user_registration';
  27. }
  28. }