public function State::deleteKeyValue in Key 8
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
- tests/
modules/ key_test/ src/ Plugin/ KeyProvider/ State.php, line 72
Class
- State
- Defines a key provider that stores in memory.
Namespace
Drupal\key_test\Plugin\KeyProviderCode
public function deleteKeyValue(KeyInterface $key) {
return $this->state
->delete('key_test:' . $this->configuration['state_key']);
}