Пример #1
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     // add your custom field
     $builder->add('lastname', 'text', array('label' => 'Nom :'))->add('firstname', 'text', array('label' => 'Prénom :'))->add('company', 'text', array('label' => 'Nom société :'))->add('legalSituation', 'choice', array('choices' => array('ei' => 'Entreprises individuelles', 'sc' => 'Sociétés civiles', 'eurl' => 'EURL', 'sarl' => 'SARL', 'sas' => 'SAS', 'sa' => 'SA'), 'label' => 'Statut juridique :'))->add('phoneNumber', 'text', array('label' => 'Téléphone :'))->add('url', 'url', array('label' => 'Url de votre site :'))->setAttribute('error_type', 'inline');
 }
Пример #2
0
 /**
  * ProfileType constructor.
  */
 public function __construct()
 {
     parent::__construct('Application\\Sonata\\UserBundle\\Entity\\User');
 }