|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
-
- namespace Lc\CaracoleBundle\EventSubscriber\Product;
-
- use Doctrine\ORM\EntityManagerInterface;
-
- use Lc\CaracoleBundle\Model\Address\AddressInterface;
- use Lc\CaracoleBundle\Model\Product\ProductInterface;
- use Lc\SovBundle\Doctrine\EntityInterface;
- use Lc\SovBundle\Doctrine\Extension\SluggableInterface;
- use Lc\SovBundle\Doctrine\Extension\SortableInterface;
- use Lc\SovBundle\Doctrine\Extension\StatusInterface;
- use Lc\SovBundle\Doctrine\Extension\TreeInterface;
- use Lc\SovBundle\Event\EntityComponentEvent;
- use Lc\SovBundle\Event\EntityManager\EntityManagerEvent;
- use Lc\SovBundle\Repository\AbstractRepositoryInterface;
- use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-
- class DuplicateProductfamilyEventSubscriber implements EventSubscriberInterface
- {
- protected $em;
- protected $adminUrlGenerator;
-
- public function __construct(EntityManagerInterface $entityManager)
- {
- $this->em = $entityManager;
- }
-
- public static function getSubscribedEvents()
- {
- return [
- EntityComponentEvent::DUPLICATE_EVENT => ['duplicateProductOnDuplicateEvent'],
- ];
- }
-
- public function duplicateProductOnDuplicateEvent(EntityComponentEvent $event)
- {
- $entity = $event->getEntity();
-
- $classMetadata = $this->em->getClassMetadata(get_class($entity));
-
-
-
- }
-
- }
|