You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

OrderSendPaymentLink.php 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace Lc\ShopBundle\Form\Backend\Order;
  3. use Doctrine\ORM\EntityManagerInterface;
  4. use Lc\ShopBundle\Context\OrderPaymentInterface;
  5. use Lc\ShopBundle\Context\OrderShopInterface;
  6. use Lc\ShopBundle\Model\OrderPayment;
  7. use Lc\ShopBundle\Services\Utils;
  8. use Symfony\Component\Form\AbstractType;
  9. use Symfony\Component\Form\Extension\Core\Type\ButtonType;
  10. use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
  11. use Symfony\Component\Form\Extension\Core\Type\DateType;
  12. use Symfony\Component\Form\Extension\Core\Type\HiddenType;
  13. use Symfony\Component\Form\Extension\Core\Type\MoneyType;
  14. use Symfony\Component\Form\Extension\Core\Type\NumberType;
  15. use Symfony\Component\Form\Extension\Core\Type\TextareaType;
  16. use Symfony\Component\Form\Extension\Core\Type\TextType;
  17. use Symfony\Component\Form\FormBuilderInterface;
  18. use Symfony\Component\OptionsResolver\OptionsResolver;
  19. class OrderSendPaymentLink extends AbstractType
  20. {
  21. protected $em;
  22. public function __construct(EntityManagerInterface $em)
  23. {
  24. $this->em = $em;
  25. }
  26. public function buildForm(FormBuilderInterface $builder, array $options)
  27. {
  28. $builder
  29. ->add('send', ButtonType::class, array(
  30. 'label' => 'action.send'
  31. ));
  32. }
  33. public function configureOptions(OptionsResolver $resolver)
  34. {
  35. $resolver->setDefaults([
  36. 'data_class' => $this->em->getClassMetadata(OrderShopInterface::class)->getName(),
  37. 'translation_domain' => 'lcshop'
  38. ]);
  39. }
  40. }