src/Event/ContactImportSubscriber.php line 27

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Event;
  4. use App\Event\ContactImportEvent;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. use App\Services\Contact\ContactImportService;
  7. class ContactImportSubscriber implements EventSubscriberInterface
  8. {
  9.     protected ContactImportService $contactImportService;
  10.     public function __construct(ContactImportService $contactImportService)
  11.     {
  12.         $this->contactImportService $contactImportService;
  13.     }
  14.     public static function getSubscribedEvents()
  15.     {
  16.         return [
  17.             ContactImportEvent::NAME => 'onContactImport',
  18.         ];
  19.     }
  20.     public function onContactImport(ContactImportEvent $event): void
  21.     {
  22.         $this->contactImportService->updateContactImportLog();
  23.     }
  24. }