<?php
namespace App\EventSubscriber\Import\EntityMapper\ProductMovie;
use App\Application\EntityImportBundle\Event\EmbeddableMapperEvent;
use App\Entity\ProductMovie;
use App\EventSubscriber\Import\EntityMapper\BaseEmbeddedSubscriber;
/**
* Class EmbeddedEntitySubscriber.
*/
class EmbeddedEntitySubscriber extends BaseEmbeddedSubscriber
{
public function onEntityPrePersist(EmbeddableMapperEvent $event): void
{
if (!$event->getEntity() instanceof ProductMovie) {
return;
}
$this->handleProductLocalizedText($event->getEntity(), $event->getEmbeddedProperties(), $event->getData());
}
}