|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
-
- namespace Lc\ShopBundle\Form\Backend\Order;
-
-
- use Doctrine\ORM\EntityManagerInterface;
- use Lc\ShopBundle\Context\OrderPaymentInterface;
- use Lc\ShopBundle\Context\OrderShopInterface;
- use Lc\ShopBundle\Model\OrderPayment;
- use Lc\ShopBundle\Services\Utils;
- use Symfony\Component\Form\AbstractType;
- use Symfony\Component\Form\Extension\Core\Type\ButtonType;
- use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
- use Symfony\Component\Form\Extension\Core\Type\DateType;
- use Symfony\Component\Form\Extension\Core\Type\HiddenType;
- use Symfony\Component\Form\Extension\Core\Type\MoneyType;
- use Symfony\Component\Form\Extension\Core\Type\NumberType;
- use Symfony\Component\Form\Extension\Core\Type\TextareaType;
- use Symfony\Component\Form\Extension\Core\Type\TextType;
- use Symfony\Component\Form\FormBuilderInterface;
- use Symfony\Component\OptionsResolver\OptionsResolver;
-
- class OrderSendPaymentLink extends AbstractType
- {
- protected $em;
-
- public function __construct(EntityManagerInterface $em)
- {
- $this->em = $em;
- }
-
- public function buildForm(FormBuilderInterface $builder, array $options)
- {
- $builder
-
- ->add('message', TextareaType::class, array(
- 'mapped'=>false
- ))
- ->add('send', ButtonType::class, array(
- 'label' => 'action.send'
- ))
-
- ->add('goto', ButtonType::class, array(
- 'label' => 'action.goto'
- ));
-
-
- }
-
- public function configureOptions(OptionsResolver $resolver)
- {
- $resolver->setDefaults([
- 'data_class' => $this->em->getClassMetadata(OrderShopInterface::class)->getName(),
- 'translation_domain' => 'lcshop'
- ]);
- }
- }
|