function StorageBase::delete

Same name in other branches
  1. 9 core/lib/Drupal/Core/KeyValueStore/StorageBase.php \Drupal\Core\KeyValueStore\StorageBase::delete()
  2. 8.9.x core/lib/Drupal/Core/KeyValueStore/StorageBase.php \Drupal\Core\KeyValueStore\StorageBase::delete()
  3. 10 core/lib/Drupal/Core/KeyValueStore/StorageBase.php \Drupal\Core\KeyValueStore\StorageBase::delete()

Overrides KeyValueStoreInterface::delete

1 method overrides StorageBase::delete()
MemoryStorage::delete in core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php
Deletes an item from the key/value store.

File

core/lib/Drupal/Core/KeyValueStore/StorageBase.php, line 51

Class

StorageBase
Provides a base class for key/value storage implementations.

Namespace

Drupal\Core\KeyValueStore

Code

public function delete($key) {
    $this->deleteMultiple([
        $key,
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.