<?php
declare(strict_types=1);
namespace App\Event;
use App\Event\ContactImportEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use App\Services\Contact\ContactImportService;
class ContactImportSubscriber implements EventSubscriberInterface
{
protected ContactImportService $contactImportService;
public function __construct(ContactImportService $contactImportService)
{
$this->contactImportService = $contactImportService;
}
public static function getSubscribedEvents()
{
return [
ContactImportEvent::NAME => 'onContactImport',
];
}
public function onContactImport(ContactImportEvent $event): void
{
$this->contactImportService->updateContactImportLog();
}
}