Example #1
0
 /**
  * Create a new fake recipient, if no one is created yet.
  *
  * @param CreateFakeRecipientEvent $event The event.
  *
  * @return void
  */
 public function createFakeRecipient(CreateFakeRecipientEvent $event)
 {
     if ($event->getRecipient()) {
         return;
     }
     $locale = null;
     if ($event->getMessage()) {
         $locale = $event->getMessage()->getLanguage();
     }
     $event->setRecipient(new FakeRecipient($locale));
 }
 /**
  * @param CreateFakeRecipientEvent $event
  */
 public function createFakeRecipient(CreateFakeRecipientEvent $event)
 {
     $recipient = $event->getRecipient();
     $message = $event->getMessage();
     $this->addSalutationToRecipient($recipient, $message);
 }