public function LockrKeyProvider::deleteKeyValue in Lockr 8.2
Same name and namespace in other branches
- 8.4 src/Plugin/KeyProvider/LockrKeyProvider.php \Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider::deleteKeyValue()
- 8.3 src/Plugin/KeyProvider/LockrKeyProvider.php \Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider::deleteKeyValue()
- 4.x src/Plugin/KeyProvider/LockrKeyProvider.php \Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider::deleteKeyValue()
Deletes the value of a key.
Parameters
\Drupal\key\KeyInterface $key: The key whose value will be deleted.
Return value
string TRUE if successful, FALSE if unsuccessful.
Overrides KeyProviderSettableValueInterface::deleteKeyValue
File
- src/
Plugin/ KeyProvider/ LockrKeyProvider.php, line 143 - Contains Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider.
Class
- LockrKeyProvider
- Adds a key provider that allows a key to be stored in Lockr.
Namespace
Drupal\lockr\Plugin\KeyProviderCode
public function deleteKeyValue(KeyInterface $key) {
$name = $key
->id();
$key_client = $this->clientFactory
->getKeyClient();
return $key_client
->delete($name);
}