src/Event/Recruit/Inquiry/EventSubscriber.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Event\Recruit\Inquiry;
  3. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  4. class EventSubscriber implements EventSubscriberInterface
  5. {
  6.     public static function getSubscribedEvents()
  7.     {
  8.         return [
  9.             'recruit_inquiry.prePersist' => 'onPrePersist',
  10.             'recruit_inquiry.postPersist' => 'onPostPersist',
  11.             'recruit_inquiry.postMailSend' => 'onPostMailSend'
  12.         ];
  13.     }
  14.     
  15.     public function onPrePersist(PrePersistEvent $event)
  16.     {
  17.         // $inquiry = $event->getInquiry();
  18.         // $form = $event->getForm();
  19.         // 永続化前に何か行う
  20.     }
  21.     
  22.     public function onPostPersist(PostPersistEvent $event)
  23.     {
  24.         // $inquiry = $event->getInquiry();
  25.         // $form = $event->getForm();
  26.         // 永続化後に何か行う
  27.     }
  28.     
  29.     public function onPostMailSend(PostMailSendEvent $event)
  30.     {
  31.         // $inquiry = $event->getInquiry();
  32.         // $form = $event->getForm();
  33.         // メール送信後に何か行う
  34.     }
  35. }