src/Sdz/UserBundle/Form/UserType.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('nom','text',array('required' =>true))
            ->add('noPieceIdent','text',array('required' =>true))
            ->add('poste','text',array('required' =>true))
            ->add('villeResidence','text',array('required' =>true))
            ->add('username','text',array('required' =>true))
            ->add('password','password',array('required' =>true,'data'=>'','attr'=>array('type'=>'password')))
            ->add('roles','entity',array('class' => 'SdzUserBundle:Role','property'=> 'role'))
            ->add('isActive','checkbox',array('required' =>false))
        ;
    }
public function buildForm ( FormBuilderInterface $ builder , array $ options ) { $ builder -> add ( 'nom' , 'text' , array ( 'required' => true ) ) -> add ( 'noPieceIdent' , 'text' , array ( 'required' => true ) ) -> add ( 'poste' , 'text' , array ( 'required' => true ) ) -> add ( 'villeResidence' , 'text' , array ( 'required' => true ) ) -> add ( 'username' , 'text' , array ( 'required' => true ) ) -> add ( 'password' , 'password' , array ( 'required' => true , 'data' => '' , 'attr' => array ( 'type' => 'password' ) ) ) -> add ( 'roles' , 'entity' , array ( 'class' => 'SdzUserBundle:Role' , 'property' => 'role' ) ) -> add ( 'isActive' , 'checkbox' , array ( 'required' => false ) ) ; }
@param FormBuilderInterface $builder
 @param array $options
@param FormBuilderInterface $builder @param array $options