Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function buildForm(FormBuilderInterface $builder, array $options = [])
 {
     parent::buildForm($builder, $options);
     $builder->add('firstName', TextType::class, ['label' => 'sylius.form.customer.first_name'])->add('lastName', TextType::class, ['label' => 'sylius.form.customer.last_name'])->add('phoneNumber', TextType::class, ['required' => false, 'label' => 'sylius.form.customer.phone_number'])->add('subscribedToNewsletter', CheckboxType::class, ['required' => false, 'label' => 'sylius.form.customer.subscribed_to_newsletter']);
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('group', CustomerGroupChoiceType::class, ['required' => false]);
     $builder->addEventSubscriber(new AddUserFormSubscriber(ShopUserType::class));
 }