src/moocApp/MoocBundle/Form/CoursType.php
/**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
@param FormBuilderInterface $builder
@param array $options
@param FormBuilderInterface $builder @param array $options
public function buildForm(FormBuilderInterface $builder, array $options) {
        $builder
                ->add('titre')
                ->add('description')
                ->add('dateDebut')
                ->add('dateFin')
                ->add('difficulte','choice',array('choices' => array('Facile' =>'Facile','Moyen' =>'Moyen','Difficile' =>'Difficile')))
                ->add('testFinale', 'entity', array('class' => 'MoocBundle:TestFinale', 'property' => 'id'))
                ->add('valider', 'submit')
        ;
    }
public function buildForm ( FormBuilderInterface $ builder , array $ options ) { $ builder -> add ( 'titre' ) -> add ( 'description' ) -> add ( 'dateDebut' ) -> add ( 'dateFin' ) -> add ( 'difficulte' , 'choice' , array ( 'choices' => array ( 'Facile' => 'Facile' , 'Moyen' => 'Moyen' , 'Difficile' => 'Difficile' ) ) ) -> add ( 'testFinale' , 'entity' , array ( 'class' => 'MoocBundle:TestFinale' , 'property' => 'id' ) ) -> add ( 'valider' , 'submit' ) ; }
@param FormBuilderInterface $builder
 @param array $options
@param FormBuilderInterface $builder @param array $options