You are here

public function TxBuffer::delete in Purge 8.3

Delete the given invalidation object from the buffer.

Parameters

array|\Drupal\purge\Plugin\Purge\Invalidation\InvalidationInterface $invalidations: Invalidation object or array with objects.

Overrides TxBufferInterface::delete

File

src/Plugin/Purge/Queue/TxBuffer.php, line 55

Class

TxBuffer
Provides the transaction buffer.

Namespace

Drupal\purge\Plugin\Purge\Queue

Code

public function delete($invalidations) {
  if (!is_array($invalidations)) {
    $invalidations = [
      $invalidations,
    ];
  }
  foreach ($invalidations as $i) {
    unset($this->instances[$i
      ->getId()]);
    unset($this->states[$i
      ->getId()]);
    unset($this->properties[$i
      ->getId()]);
  }
}