/**
  * Dispatched each time the listener is triggered.
  *
  * @param ReferredEvent $event
  */
 public function onReferral(ReferredEvent $event)
 {
     $referral = $event->getReferral();
     $this->buildAndSendEmail($referral);
 }
 /**
  * Dispatched each time the listener is triggered.
  *
  * @param ReferredEvent $event
  */
 public function onReferral(ReferredEvent $event)
 {
     $referral = $event->getReferral();
     $note = sprintf("This policy has been referred for the following reason(s)\n\n%s", implode("\n", $referral->getAllReferralReasons()));
     $this->policyNote->addNote($referral->getPolicyNumber(), $note);
 }