src/Service/Admission/Tickets/OperatorSubscriber.php line 25

Open in your IDE?
  1. <?php
  2. namespace App\Service\Admission\Tickets;
  3. use App\Entity\Admission\Tickets\TicketOperator;
  4. use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityPersistedEvent;
  5. use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityUpdatedEvent;
  6. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  7. class OperatorSubscriber implements EventSubscriberInterface
  8. {
  9.     /**
  10.      * @inheritDoc
  11.      */
  12.     public static function getSubscribedEvents()
  13.     {
  14.         return [
  15.             BeforeEntityUpdatedEvent::class => ['deleteAccess']
  16.         ];
  17.     }
  18.     public function deleteAccess(BeforeEntityUpdatedEvent $event)
  19.     {
  20.         $entity $event->getEntityInstance();
  21.         if ($entity instanceof TicketOperator) {
  22.         }
  23.     }
  24. }