/** * We setup the notification settings regardless of the client asking the * scope or not. * @param OAuthEvent $event */ public function setupNotificationSettings(OAuthEvent $event) { $person = $this->getUser($event); $client = $event->getClient(); $this->notificationHandler->getSettingsByClient($person, $client); $this->notificationHandler->initializeSettings($person, $client); }
private function sendNotificationEmail(NotificationInterface $notification) { if (null === $notification->getMailTemplate()) { $notification->setMailTemplate($this->notificationHandler->getEmailHtml($notification)); } $this->mailer->sendEmailBasedOnNotification($notification->getId(), $notification->getCategory()->getMailSenderAddress(), $notification->getPerson()->getEmail(), $notification->getTitle(), $notification->getMailTemplate()); }
public function countUnreadByClient() { return $this->handler->countUnreadByClient($this->person); }