public function DatabaseQueue::deleteItemMultiple in Purge 8.3
Delete multiple items from the queue at once.
Parameters
array $items: Non-associative array with item objects as returned by claimItemMultiple() or \Drupal\Core\Queue\QueueInterface::claimItem().
Overrides QueueInterface::deleteItemMultiple
File
- src/
Plugin/ Purge/ Queue/ DatabaseQueue.php, line 251
Class
- DatabaseQueue
- A QueueInterface compliant database backed queue.
Namespace
Drupal\purge\Plugin\Purge\QueueCode
public function deleteItemMultiple(array $items) {
$item_ids = [];
foreach ($items as $item) {
$item_ids[] = $item->item_id;
}
$this->connection
->delete(static::TABLE_NAME)
->condition('item_id', $item_ids, 'IN')
->execute();
}