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