Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

51 rinda
1.6KB

  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. }