/** * @return PersonNotificationOption */ private function getSettings($notification) { $person = $notification->getPerson(); $category = $notification->getCategory(); $client = $category->getClient(); $settings = $this->notificationHandler->getSettings($person, $category, $client); if (!$settings) { if ($this->notificationHandler->initializeSettings($person, $client)) { $settings = $this->notificationHandler->getSettings($person, $category, $client); } } return reset($settings); }
public function getSettings(CategoryInterface $category = null, ClientInterface $client = null) { return $this->handler->getSettings($this->person, $category, $client); }