You are here

public function DigestBase::markSent in Message Digest 8

Mark the sent digest messages as sent in the message_digest DB table.

Parameters

\Drupal\user\UserInterface $account: User account for which to mark the digest as sent.

int $last_mid: The last MID to be sent in the digest.

Overrides DigestInterface::markSent

File

src/Plugin/Notifier/DigestBase.php, line 221

Class

DigestBase
Message Digest notifier.

Namespace

Drupal\message_digest\Plugin\Notifier

Code

public function markSent(UserInterface $account, $last_mid) {
  $this->connection
    ->update('message_digest')
    ->fields([
    'sent' => 1,
  ])
    ->condition('receiver', $account
    ->id())
    ->condition('notifier', $this
    ->getPluginId())
    ->condition('mid', $last_mid, '<=')
    ->execute();
}