private function PrivateMessageThreadManager::getNotificationRecipients in Private Message 8.2
The users to receive notifications.
Return value
\Drupal\Core\Session\AccountInterface[] An array of Account objects of the thread members who are to receive the notification.
1 call to PrivateMessageThreadManager::getNotificationRecipients()
- PrivateMessageThreadManager::sendNotification in src/
Service/ PrivateMessageThreadManager.php - Send the notification.
File
- src/
Service/ PrivateMessageThreadManager.php, line 131
Class
- PrivateMessageThreadManager
- The Private Message generator class.
Namespace
Drupal\private_message\ServiceCode
private function getNotificationRecipients() {
if (empty($this->excludeFromNotification)) {
return $this->recipients;
}
return array_filter($this->recipients, function (AccountInterface $account) {
// If this user is in the excluded list, filter them from the recipients
// list so they do not receive the notification.
return !in_array($account, $this->excludeFromNotification);
});
}