src/Event/Contact/Subscriber.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Event\Contact;
  3. use App\Entity\Inquiry\InquiryInterface;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. use Psr\Log\LoggerInterface;
  6. class Subscriber implements EventSubscriberInterface
  7. {
  8.     protected $logger;
  9.     public function __construct(LoggerInterface $logger) {
  10.         $this->logger $logger;
  11.     }
  12.     public static function getSubscribedEvents() {
  13.         return [
  14.             PostSendEvent::NAME => "onPostSend"
  15.         ];
  16.     }
  17.     public function onPostSend(PostSendEvent $Event) {
  18.         // 送ったToのログはMailServiceで書き込まれている
  19.         // ... Do samething
  20.     }
  21. }