/**
  * Fill the properties of the event
  *
  * @param <AbstractEventNotification> $event
  */
 public function autoFill(AbstractEventNotification $event)
 {
     if ($event->getSender() === null || !is_string($event->getSender())) {
         throw new EyeInvalidArgumentException('Missing or invalid sender property');
     }
     $username = PeopleEventHandler::retrieveContactName($event->getSender());
     $event->setMessageInformation(array('User %s would like to add you to his/her eyeOS Network.', array($username)));
     $event->setIsQuestion(true);
     $event->setQuestion('Do you want to confirm?');
     $event->setAvailableAnswers('Confirm#Cancel');
 }
 /**
  * Fill the properties of the event
  *
  * @param <AbstractEventNotification> $event
  */
 public function autoFill(AbstractEventNotification $event)
 {
     if ($event->getEventData() === null) {
         throw new EyeInvalidArgumentException('You must specify the eventData property');
     }
     $eventData = $event->getEventData();
     if (!isset($eventData['groupId']) || !is_string($eventData['groupId'])) {
         throw new EyeInvalidArgumentException('Missing or invalid $eventData[\'groupId\']');
     }
     $wGroupId = $eventData['groupId'];
     $wGroupName = GroupsEventHandler::retrieveWorkgroupName($wGroupId);
     $username = GroupsEventHandler::retrieveContactName($event->getSender());
     $event->setMessageInformation(array('User %s invited you in %s group.', array($username, $wGroupName)));
     $event->setIsQuestion(true);
     $event->setQuestion('Do you want to confirm?');
     $event->setAvailableAnswers('Confirm#Cancel');
 }