mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
use NotificationPersister into PersonMoveEventSubscriber
This commit is contained in:
@@ -13,10 +13,10 @@ namespace Chill\PersonBundle\AccompanyingPeriod\Events;
|
||||
|
||||
use Chill\MainBundle\Entity\Address;
|
||||
use Chill\MainBundle\Entity\Notification;
|
||||
use Chill\MainBundle\Notification\NotificationPersisterInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Event\Person\PersonAddressMoveEvent;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Templating\EngineInterface;
|
||||
@@ -26,7 +26,7 @@ class PersonAddressMoveEventSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
private EngineInterface $engine;
|
||||
|
||||
private EntityManagerInterface $entityManager;
|
||||
private NotificationPersisterInterface $notificationPersister;
|
||||
|
||||
private Security $security;
|
||||
|
||||
@@ -34,12 +34,12 @@ class PersonAddressMoveEventSubscriber implements EventSubscriberInterface
|
||||
|
||||
public function __construct(
|
||||
EngineInterface $engine,
|
||||
EntityManagerInterface $entityManager,
|
||||
NotificationPersisterInterface $notificationPersister,
|
||||
Security $security,
|
||||
TranslatorInterface $translator
|
||||
) {
|
||||
$this->engine = $engine;
|
||||
$this->entityManager = $entityManager;
|
||||
$this->notificationPersister = $notificationPersister;
|
||||
$this->security = $security;
|
||||
$this->translator = $translator;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ class PersonAddressMoveEventSubscriber implements EventSubscriberInterface
|
||||
'period' => $period,
|
||||
]));
|
||||
|
||||
$this->entityManager->persist($notification);
|
||||
$this->notificationPersister->persist($notification);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user