You are here

public function QueueBase::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

1 method overrides QueueBase::deleteItemMultiple()
MemoryQueue::deleteItemMultiple in src/Plugin/Purge/Queue/MemoryQueue.php
Delete multiple items from the queue at once.

File

src/Plugin/Purge/Queue/QueueBase.php, line 64

Class

QueueBase
Provides a ReliableQueueInterface compliant queue that holds queue items.

Namespace

Drupal\purge\Plugin\Purge\Queue

Code

public function deleteItemMultiple(array $items) {

  // This implementation emulates multiple item deletion and is NOT efficient,
  // but exists to provide API reliability. Derivatives are invited to
  // override it, for example by one multi-row delete database query.
  foreach ($items as $item) {
    $this
      ->deleteItem($item);
  }
}