protected function Subscribers::addDefaultNotifiers in Message Subscribe 8
Get the default notifiers for a given set of users.
Parameters
\Drupal\message_subscribe\Subscribers\DeliveryCandidateInterface[] &$uids: An array detailing notification info for users.
1 call to Subscribers::addDefaultNotifiers()
- Subscribers::getSubscribers in src/
Subscribers.php - Retrieve a list of subscribers for a given entity.
File
- src/
Subscribers.php, line 474
Class
- Subscribers
- A message subscribers service.
Namespace
Drupal\message_subscribeCode
protected function addDefaultNotifiers(array &$uids) {
$notifiers = $this->config
->get('default_notifiers');
if (empty($notifiers)) {
return;
}
// Use notifier names as keys to avoid potential duplication of notifiers
// by other modules' hooks.
foreach (array_keys($uids) as $uid) {
foreach ($notifiers as $notifier) {
$uids[$uid]
->addNotifier($notifier);
}
}
}