function StateInterface::get
Same name in other branches
- 9 core/lib/Drupal/Core/State/StateInterface.php \Drupal\Core\State\StateInterface::get()
- 8.9.x core/lib/Drupal/Core/State/StateInterface.php \Drupal\Core\State\StateInterface::get()
- 11.x core/lib/Drupal/Core/State/StateInterface.php \Drupal\Core\State\StateInterface::get()
Returns the stored value for a given key.
Parameters
string $key: The key of the data to retrieve.
mixed $default: The default value to use if the key is not found.
Return value
mixed The stored value, or NULL if no value exists.
File
-
core/
lib/ Drupal/ Core/ State/ StateInterface.php, line 23
Class
- StateInterface
- Defines the interface for the state system.
Namespace
Drupal\Core\StateCode
public function get($key, $default = NULL);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.