You are here

public function KeyProviderSettableValueInterface::setKeyValue in Key 8

Sets the value of a key.

Parameters

\Drupal\key\KeyInterface $key: The key whose value will be set.

string $key_value: The key value.

Return value

bool TRUE if successful, FALSE if unsuccessful.

2 methods override KeyProviderSettableValueInterface::setKeyValue()
ConfigKeyProvider::setKeyValue in src/Plugin/KeyProvider/ConfigKeyProvider.php
Sets the value of a key.
State::setKeyValue in tests/modules/key_test/src/Plugin/KeyProvider/State.php
Sets the value of a key.

File

src/Plugin/KeyProviderSettableValueInterface.php, line 23

Class

KeyProviderSettableValueInterface
Defines an interface for provider plugins that allow setting a key value.

Namespace

Drupal\key\Plugin

Code

public function setKeyValue(KeyInterface $key, $key_value);