function State::get
Same name in other branches
- 8.9.x core/lib/Drupal/Core/State/State.php \Drupal\Core\State\State::get()
- 10 core/lib/Drupal/Core/State/State.php \Drupal\Core\State\State::get()
- 11.x core/lib/Drupal/Core/State/State.php \Drupal\Core\State\State::get()
Overrides StateInterface::get
File
-
core/
lib/ Drupal/ Core/ State/ State.php, line 39
Class
- State
- Provides the state system using a key value store.
Namespace
Drupal\Core\StateCode
public function get($key, $default = NULL) {
$values = $this->getMultiple([
$key,
]);
return $values[$key] ?? $default;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.