<?php
namespace App\Service\Admission\Tickets;
use App\Entity\Admission\Tickets\TicketOperator;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityPersistedEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityUpdatedEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class OperatorSubscriber implements EventSubscriberInterface
{
/**
* @inheritDoc
*/
public static function getSubscribedEvents()
{
return [
BeforeEntityUpdatedEvent::class => ['deleteAccess']
];
}
public function deleteAccess(BeforeEntityUpdatedEvent $event)
{
$entity = $event->getEntityInstance();
if ($entity instanceof TicketOperator) {
}
}
}