function State::registerKeySetDuringRequest
Registers a key that was set during the request.
Parameters
string $key: The key that was set.
mixed $value: The value that was set.
mixed $previousValue: The previous value that was stored.
2 calls to State::registerKeySetDuringRequest()
- State::set in core/
lib/ Drupal/ Core/ State/ State.php - Implements \Drupal\Core\Cache\CacheCollectorInterface::set().
- State::setMultiple in core/
lib/ Drupal/ Core/ State/ State.php - Saves key/value pairs.
File
-
core/
lib/ Drupal/ Core/ State/ State.php, line 170
Class
- State
- Provides the state system using a key value store.
Namespace
Drupal\Core\StateCode
protected function registerKeySetDuringRequest(string $key, mixed $value, mixed $previousValue) : void {
$this->keysSetDuringRequest[$key]['value'] = $value;
if (!array_key_exists('original', $this->keysSetDuringRequest[$key])) {
$this->keysSetDuringRequest[$key]['original'] = $previousValue;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.