src/Aqarmap/Bundle/NotificationBundle/EventListener/NotificationSubscriber.php line 25

Open in your IDE?
  1. <?php
  2. namespace Aqarmap\Bundle\NotificationBundle\EventListener;
  3. use Aqarmap\Bundle\NotificationBundle\Events\NotificationSent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class NotificationSubscriber implements EventSubscriberInterface
  6. {
  7.     /**
  8.      * Returns an array of event names this subscriber wants to listen to.
  9.      *
  10.      * @return array
  11.      */
  12.     public static function getSubScribedEvents()
  13.     {
  14.         return [
  15.             'notification.sent' => 'notificationSent',
  16.         ];
  17.     }
  18.     /**
  19.      * When notification sent.
  20.      */
  21.     public function notificationSent(NotificationSent $notification): void
  22.     {
  23.         // you may hook here
  24.     }
  25. }