DatabaseStorage::deleteMultiple

public DatabaseStorage::deleteMultiple(array $keys)

Deletes multiple items from the key/value store.

Parameters

array $keys: A list of item names to delete.

Overrides KeyValueStoreInterface::deleteMultiple

File

core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php, line 149

Class

DatabaseStorage
Defines a default key/value store implementation.

Namespace

Drupal\Core\KeyValueStore

Code

public function deleteMultiple(array $keys) {
  // Delete in chunks when a large array is passed.
  while ($keys) {
    $this->connection->delete($this->table)
      ->condition('name', array_splice($keys, 0, 1000), 'IN')
      ->condition('collection', $this->collection)
      ->execute();
  }
}
doc_Drupal
2016-10-29 08:59:55
Comments
Leave a Comment

Please login to continue.