You are here

public function SpoolStorage::updateMails in Simplenews 8.2

Same name and namespace in other branches
  1. 8 src/Spool/SpoolStorage.php \Drupal\simplenews\Spool\SpoolStorage::updateMails()
  2. 3.x src/Spool/SpoolStorage.php \Drupal\simplenews\Spool\SpoolStorage::updateMails()

Update status of mail data in spool table.

Time stamp is set to current time.

Parameters

array $msids: Array of Mail spool ids to be updated.

int $status: One of the SpoolStorageInterface::STATUS_* constants.

Overrides SpoolStorageInterface::updateMails

1 call to SpoolStorage::updateMails()
SpoolStorage::getMails in src/Spool/SpoolStorage.php
This function allocates mails to be sent in current run.

File

src/Spool/SpoolStorage.php, line 152

Class

SpoolStorage
Default database spool storage.

Namespace

Drupal\simplenews\Spool

Code

public function updateMails(array $msids, $status) {
  $this->connection
    ->update('simplenews_mail_spool')
    ->condition('msid', (array) $msids, 'IN')
    ->fields([
    'status' => $status,
    'timestamp' => REQUEST_TIME,
  ])
    ->execute();
}