1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| <?php
namespace LGB\BourseLivresBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
class EditType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder->add('parentparent', new ParentsType(), array('label' => 'Informations sur le responsable :', ));
$builder
->add('nom', 'text', array('label' => 'Nom :', ))
->add('prenom', 'text')
->add('dateNaissance', 'birthday', array('widget' => 'text', 'format' => 'd-M-y','pattern' => "{{ day }}/{{ month }}/{{ year }}",));
$builder->add('optionsoption', new OptionsType(), array('label' => 'Liste Options :', ));
$builder->add('classeclasse', new ClasseType(), array('label' => 'Classe :', ));
}
public function getName()
{
return 'lgb_bourselivresbundle_edit';
}
public function getDefaultOptions(array $options)
{
return array(
'data_class' => 'LGB\BourseLivresBundle\Entity\Eleve',
);
}
} |
Partager