src/Form/Order/OrderDevisFormType.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Form\Order;
  3. use App\Entity\Order\Order;
  4. use App\Form\Order\OrderLineType;
  5. use Symfony\Component\Form\AbstractType;
  6. use Symfony\Component\Form\Extension\Core\Type\CollectionType;
  7. use Symfony\Component\Form\Extension\Core\Type\SubmitType;
  8. use Symfony\Component\Form\FormBuilderInterface;
  9. use Symfony\Component\OptionsResolver\OptionsResolver;
  10. use Doctrine\ORM\EntityManagerInterface;
  11. use Symfony\Component\Form\Extension\Core\Type\{CheckboxType,
  12.     EmailType,
  13.     TextType,
  14.     TextareaType,
  15.     NumberType,
  16.     ChoiceType};
  17. use Symfony\Component\Form\Extension\Core\Type\DateType;
  18. use App\Form\Address\{ShippingAddressTypeBillingAddressTypeAddressType};
  19. class OrderDevisFormType extends AbstractType
  20. {
  21.     public function buildForm(FormBuilderInterface $builder, array $options)
  22.     {
  23.         $builder
  24.             /*->add('orderLines', CollectionType::class, [
  25.                 'entry_type' => OrderLineType::class,
  26.             ])*/
  27. //            ->add('state', ChoiceType::class,[
  28. //                'choices' => Order::getStatesChoice(),
  29. //                'label' => 'État'
  30. //            ])
  31. //            ->add('carrier')
  32. //            ->add('paymentMethod')
  33. //            ->add('datePayment', DateType::class, [
  34. //                'label' => 'Date de paiement',
  35. //                'widget' => 'single_text',
  36. //                'format' => 'dd/MM/yyyy',
  37. //                'html5' => false,
  38. //                'attr' => ['class' => 'datepicker'],
  39. //                'required' => false
  40. //            ])
  41.             ->add('email'EmailType::class, [
  42.                     'required'=>false
  43.             ])
  44.             ->add('shippingAddress'ShippingAddressType::class)
  45. //            ->add('billingAddress', BillingAddressType::class)
  46. //            ->add('discount', NumberType::class, [
  47. //                'required' => false,
  48. //                'attr' => ['class' => 'discount']
  49. //            ])
  50. //            ->add('discountType', ChoiceType::class, [
  51. //                'choices' => \App\Entity\Order\Order::DISCOUNT_TYPE_CHOICES,
  52. //                'required' => false,
  53. //                'attr' => ['class' => 'discountType']
  54. //            ])
  55. //            ->add('customer', null, ['label' => false, 'attr' => ['class' => 'bootstrap-select']])
  56.         ;
  57.     }
  58.     public function configureOptions(OptionsResolver $resolver)
  59.     {
  60.         $resolver->setDefaults([
  61.             'data_class' => Order::class,
  62.             'label' => ' '
  63.         ]);
  64.     }
  65. }