<?php

namespace Lc\ShopBundle\Form\Backend\Order;

use App\Entity\Product;
use Doctrine\ORM\EntityManagerInterface;
use Lc\ShopBundle\Context\OrderProductInterface;
use Lc\ShopBundle\Context\OrderReductionCartInterface;
use Lc\ShopBundle\Context\ProductInterface;
use Lc\ShopBundle\Form\DataTransformer\ProductToIdTransformer;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class DeleteOrderReductionCreditType extends AbstractType
{
        protected $em ;

        public function __construct(EntityManagerInterface $em)
        {
                $this->em = $em ;
        }

        public function buildForm(FormBuilderInterface $builder, array $options)
        {
                $builder
                        ->add('id', HiddenType::class)
                        ->add('delete', ButtonType::class);

/*                        ->add('id', HiddenType::class);*/
        }

        public function configureOptions(OptionsResolver $resolver)
        {
                /*$resolver->setDefaults([
                        'data_class' => $this->em->getClassMetadata(OrderReductionCartInterface::class)->getName(),
                ]);*/
        }
}
