src/EventSubscriber/LoginSubscriber.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\EventSubscriber;
  3. use Doctrine\ORM\EntityManagerInterface;
  4. use Psr\Log\LoggerInterface;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
  7. use Symfony\Component\HttpKernel\Event\RequestEvent;
  8. use Symfony\Component\HttpKernel\Event\ResponseEvent;
  9. class LoginSubscriber implements EventSubscriberInterface
  10. {
  11.     private $em;
  12.     private $log;
  13.     public function __construct(EntityManagerInterface $emLoggerInterface $log)
  14.     {
  15.         $this->em $em;
  16.         $this->log $log;
  17.     }
  18.     public function onSecurityInteractiveLogin(InteractiveLoginEvent $event)
  19.     {
  20.     }
  21.     public static function getSubscribedEvents()
  22.     {
  23.         return [
  24.             'security.interactive_login' => 'onSecurityInteractiveLogin',
  25.         ];
  26.     }
  27. }