BusinessCardCreationSubscriber
in package
implements
EventSubscriberInterface
Déclenche la synchronisation des contacts après la création d'une `BusinessCardAize`.
Écoute l'événement Doctrine Events::postPersist (aucune priorité
déclarée). Ignore toute entité qui n'est pas une BusinessCardAize. Pour
une nouvelle carte, récupère son utilisateur propriétaire puis délègue à
BCardContactSyncService::syncContactWithBCard() la recherche d'un
contact existant du même utilisateur partageant l'e-mail de la carte, afin
de les rapprocher automatiquement. Journalise l'absence de propriétaire et
toute exception levée par la synchronisation sans jamais la propager.
Table of Contents
Interfaces
- EventSubscriberInterface
Properties
- $contactSyncService : BCardContactSyncService
- $logger : LoggerInterface
Methods
- __construct() : mixed
- getSubscribedEvents() : array<string|int, mixed>
- postPersist() : void
Properties
$contactSyncService
private
BCardContactSyncService
$contactSyncService
$logger
private
LoggerInterface
$logger
Methods
__construct()
public
__construct(BCardContactSyncService $contactSyncService, LoggerInterface $logger) : mixed
Parameters
- $contactSyncService : BCardContactSyncService
- $logger : LoggerInterface
getSubscribedEvents()
public
getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>postPersist()
public
postPersist(LifecycleEventArgs $args) : void
Parameters
- $args : LifecycleEventArgs