src/EventSubscriber/RankingEventSubscriber.php line 32

Open in your IDE?
  1. <?php
  2. namespace App\EventSubscriber;
  3. use App\Entity\AdmissionRegister;
  4. use App\Event\RankingEvent;
  5. use Doctrine\ORM\EntityManagerInterface;
  6. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  7. class RankingEventSubscriber implements EventSubscriberInterface
  8. {
  9.     protected EntityManagerInterface $em;
  10.     public function __construct(EntityManagerInterface $em)
  11.     {
  12.         $this->em $em;
  13.     }
  14.     public static function getSubscribedEvents()
  15.     {
  16.         return [
  17.             RankingEvent::ACCEPT => 'onAccept',
  18.             RankingEvent::DECLINE => 'onDecline',
  19.         ];
  20.     }
  21.     public function onAccept(RankingEvent $rankingEvent): void
  22.     {
  23.     }
  24.     public function onDecline(RankingEvent $rankingEvent): void
  25.     {
  26.     }
  27. }