src/Component/Organization/Form/Type/CustomerType.php line 13

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace BitBag\OpenMarketplace\Component\Organization\Form\Type;
  4. use Sylius\Bundle\CoreBundle\Form\Type\User\ShopUserType;
  5. use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
  6. use Symfony\Component\Form\Extension\Core\Type\EmailType;
  7. use Symfony\Component\Form\Extension\Core\Type\TextType;
  8. use Symfony\Component\Form\FormBuilderInterface;
  9. final class CustomerType extends AbstractResourceType
  10. {
  11.     public function buildForm(FormBuilderInterface $builder, array $options): void
  12.     {
  13.         $builder
  14.             ->add('email'EmailType::class, [
  15.                 'label' => 'sylius.form.customer.email',
  16.             ])
  17.             ->add('firstName'TextType::class, [
  18.                 'label' => 'sylius.form.customer.first_name',
  19.             ])
  20.             ->add('lastName'TextType::class, [
  21.                 'label' => 'sylius.form.customer.last_name',
  22.             ])
  23.             ->add('user'ShopUserType::class, [
  24.                 'label' => false,
  25.             ])
  26.             ->add('organization'OrganizationType::class, [
  27.                 'label' => false,
  28.             ])
  29.         ;
  30.     }
  31. }