public function SpoolStorage::deleteMails in Simplenews 8.2
Same name and namespace in other branches
- 8 src/Spool/SpoolStorage.php \Drupal\simplenews\Spool\SpoolStorage::deleteMails()
- 3.x src/Spool/SpoolStorage.php \Drupal\simplenews\Spool\SpoolStorage::deleteMails()
Remove records from mail spool table according to the conditions.
Return value
int Count deleted
Overrides SpoolStorageInterface::deleteMails
1 call to SpoolStorage::deleteMails()
- SpoolStorage::deleteIssue in src/
Spool/ SpoolStorage.php - Deletes a newsletter issue from the mail spool.
File
- src/
Spool/ SpoolStorage.php, line 219
Class
- SpoolStorage
- Default database spool storage.
Namespace
Drupal\simplenews\SpoolCode
public function deleteMails(array $conditions) {
$query = $this->connection
->delete('simplenews_mail_spool');
foreach ($conditions as $condition => $value) {
$query
->condition($condition, $value);
}
return $query
->execute();
}