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 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
class CustomerForm extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('name', 'text', array('label' => 'customer.name'))
->add('login', 'text', array('label' => 'customer.login'))
->add('password', 'text', array('label' => 'customer.password'))
->add('address', 'text', array('label' => 'customer.address'))
->add('creationDate', 'datetime', array('label' => 'customer.creationDate'))
->add('frenchSiret', 'text', array('label' => 'customer.frenchSiret',
'required' => false
)
)
->add('webSite', 'text', array('label' => 'customer.webSite',
'required' => false
)
)
->add('europeanVat', 'text', array('label' => 'customer.europeanVat',
'required' => false
)
)
->add('customerType', 'entity', array('label' => 'customerType',
'class' => 'Portal\CustomerManagementBundle\Entity\customerType',
'property' => 'name',
'required' => true,
'multiple' => false
)
)
->add('customerStatus', 'entity', array('label' => 'customerStatus',
'class' => 'Portal\CustomerManagementBundle\Entity\customerStatus',
'property' => 'name',
'required' => true,
'multiple' => false
)
)
->add('city', 'entity', array('label' => 'city',
'class' => 'Portal\CustomerManagementBundle\Entity\City',
'property' => 'name',
'required' => true,
'multiple' => false
)
)
;
} |
Partager