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
|
class RegistrationFormType extends basetype {
public function buildForm(FormBuilderInterface $builder, array $options) {
parent::buildForm($builder, $options);
$builder
->add('type', 'choice',
array(
'translation_domain' => 'FOSUserBundle',
'choices' => array(
'ROLE_CLIENT' => 'Client',
'ROLE_PROVIDER' => 'Provider',
),
'label' => 'Type de compte',
'required' => true,
'expanded' => true
)
)
->add('client', New ClientType())
->add('provider', New ProviderType())
;
}
public function getName() {
return 'isl_user_registration';
}
} |
Partager