protected function MessageDigestTrait::countAllUndeliveredDigestMessages in Message Digest 8
Returns the total number of undelivered digest messages.
Return value
int The number of undelivered messages.
1 call to MessageDigestTrait::countAllUndeliveredDigestMessages()
- MessageDigestSubContext::deliverAllDigests in ./
message_digest.behat.inc - Delivers all message digests.
File
- src/
Traits/ MessageDigestTrait.php, line 20
Class
- MessageDigestTrait
- Methods useful for testing and integrating the Message Digest module.
Namespace
Drupal\message_digest\TraitsCode
protected function countAllUndeliveredDigestMessages() {
$count = 0;
foreach ($this
->getMessageDigestManager()
->getNotifiers() as $notifier) {
foreach ($notifier
->getRecipients() as $uid) {
$count += count($this
->getUserMessagesByNotifier($notifier, $uid));
}
}
return $count;
}