src/EventSubscriber/ProcedureStepNotificationMethodSubscriber.php line 62

Open in your IDE?
  1. <?php
  2. /**
  3.  * This file is part of the CosaVostra, TrackPay package.
  4.  *
  5.  * (c) Mohamed Radhi GUENNICHI <rg@mate.tn> <+216 50 711 816>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace App\EventSubscriber;
  12. use App\Event\ProcedureStepNotificationMethodEvent;
  13. use App\Service\EmailParametersGenerator;
  14. use App\Service\PdfGeneratorService;
  15. use App\Service\Sendinblue\SMTPApi;
  16. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  17. class ProcedureStepNotificationMethodSubscriber implements EventSubscriberInterface
  18. {
  19.     /**
  20.      * @var SMTPApi
  21.      */
  22.     protected $smtp;
  23.     /**
  24.      * @var EmailParametersGenerator
  25.      */
  26.     protected $parametersGenerator;
  27.     /**
  28.      * @var PdfGeneratorService
  29.      */
  30.     protected $pdfGenerator;
  31.     /**
  32.      * ProcedureDispatchSubscriber constructor.
  33.      *
  34.      * @param SMTPApi                  $smtp
  35.      * @param EmailParametersGenerator $parametersGenerator
  36.      * @param PdfGeneratorService      $pdfGenerator
  37.      */
  38.     public function __construct(SMTPApi $smtpEmailParametersGenerator $parametersGeneratorPdfGeneratorService $pdfGenerator)
  39.     {
  40.         $this->smtp                $smtp;
  41.         $this->parametersGenerator $parametersGenerator;
  42.         $this->pdfGenerator        $pdfGenerator;
  43.     }
  44.     /**
  45.      * @inheritDoc
  46.      */
  47.     public static function getSubscribedEvents()
  48.     {
  49.         return [
  50.             ProcedureStepNotificationMethodEvent::class => 'onNotificationMethod'
  51.         ];
  52.     }
  53.     public function onNotificationMethod(ProcedureStepNotificationMethodEvent $event): void
  54.     {
  55.         // TODO: add other notification methods handlers here.
  56.     }
  57. }