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
| <?php
namespace portailQuapricAuto\LogistiqueBundle\Form;
use portailQuapricAuto\VehiculeBundle\Form\VoitureType;
use portailQuapricAuto\ContactBundle\Form\FournisseurType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
class AchatType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('date','birthday')
->add('villeAchat', 'text', array('max_length' => 20, 'required' => false, 'label' => 'Ville d \'achat ', 'trim' => true, 'read_only' => false, 'error_bubbling' => false))
->add('Vehicule', new voitureType )
->add('fournisseur', 'entity', array(
'class' => 'portailQuapricAutoContactBundle:Fournisseur',
'property' => 'name',
))
;
}
public function getName()
{
return 'portailquapricauto_logistiquebundle_achattype';
}
} |
Partager