<?php
namespace App\EventSubscriber;
use App\Entity\AdmissionRegister;
use App\Event\RankingEvent;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class RankingEventSubscriber implements EventSubscriberInterface
{
protected EntityManagerInterface $em;
public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
public static function getSubscribedEvents()
{
return [
RankingEvent::ACCEPT => 'onAccept',
RankingEvent::DECLINE => 'onDecline',
];
}
public function onAccept(RankingEvent $rankingEvent): void
{
}
public function onDecline(RankingEvent $rankingEvent): void
{
}
}