/** * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { $fileFormat = new fileFormat(); $iconChoice = $fileFormat->getTypeIcons(); $builder->add('nom', 'text', array('label' => 'form.nom', 'required' => true))->add('icon', 'choice', array('label' => 'form.icone', 'required' => true, 'multiple' => false, 'expanded' => false, 'choices' => $iconChoice))->add('contentType', 'text', array('label' => 'Content Type'))->add('enabled', 'checkbox', array('label' => 'actif', 'required' => false)); // ajoute les valeurs hidden, passés en paramètre $builder = $this->addHiddenValues($builder); // AJOUT SUBMIT $builder->add('submit', 'submit', array('label' => 'form.enregistrer', 'attr' => array('class' => "btn btn-md btn-block btn-info"))); }