public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); // $builder // ->add('acces', 'choice', array( // 'choices' => array('Evenement' => 'Evenement', 'Formation' => 'Formation'), // 'preferred_choices' => array('Evenement'), // )) $builder->add('roles', 'choice', array('choices' => $this->rolesChoices, 'expanded' => true, 'multiple' => true, 'required' => false)); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('firstname', null, array('label' => 'firstname', 'translation_domain' => 'FOSUserBundle'))->add('lastname', null, array('label' => 'lastname', 'translation_domain' => 'FOSUserBundle')); }