You are here

protected function MessageDigestTrait::expireMessageDigestNotifiers in Message Digest 8

Makes sure all notifiers will process messages at the next cron run.

1 call to MessageDigestTrait::expireMessageDigestNotifiers()
MessageDigestSubContext::deliverAllDigests in ./message_digest.behat.inc
Delivers all message digests.

File

src/Traits/MessageDigestTrait.php, line 33

Class

MessageDigestTrait
Methods useful for testing and integrating the Message Digest module.

Namespace

Drupal\message_digest\Traits

Code

protected function expireMessageDigestNotifiers() {

  /** @var \Drupal\Core\State\StateInterface $state */
  $state = \Drupal::service('state');
  foreach ($this
    ->getMessageDigestManager()
    ->getNotifiers() as $notifier) {
    $key = $notifier
      ->getPluginId() . '_last_run';
    $state
      ->set($key, 0);
  }
}