public function contactConfirmed(PeopleEvent $e) { $sourceId = $e->getSource(); $targetId = $e->getRelatedSource(); $NetSyncMessage = new NetSyncMessage('NSPeople', 'confirmContact', $targetId, $sourceId); NetSyncController::getInstance()->send($NetSyncMessage); }
public function contactConfirmed(PeopleEvent $e) { $sourceId = $e->getSource(); $targetId = $e->getRelatedSource(); // Send Event to Sender... $info = new EyeosEventNotification(); $info->setType('People_ConfirmContactSender'); $info->setEventData($targetId); $eventManager = new EventNotificationManager(); $eventManager->sendEventByType($info); // Send Event to Receiver... $info = new EyeosEventNotification(); $info->setType('People_ConfirmContactReceiver'); $info->setSender($sourceId); $info->setReceiver($targetId); $eventManager = new EventNotificationManager(); $eventManager->sendEventByType($info); // Closing the relatives events... $info = new EyeosEventNotification(); $info->setType('People_RequestRelationshipReceiver'); $info->setSender($targetId); $info->setReceiver($sourceId); $info->setIsQuestion(1); $eventManager = new EventNotificationManager(); $eventsToRemove = $eventManager->searchEvents($info); foreach ($eventsToRemove as $event) { $abstractEvent = new EyeosEventNotification(); $abstractEvent->setEventInformation($event); $abstractEvent->setHasEnded(true); $eventManager->updateEventNotification($abstractEvent); } }