public function LocaleProjectStorage::get in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/locale/src/LocaleProjectStorage.php \Drupal\locale\LocaleProjectStorage::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 the default value if no value exists.
Overrides LocaleProjectStorageInterface::get
File
- core/
modules/ locale/ src/ LocaleProjectStorage.php, line 51 - Contains \Drupal\locale\LocaleProjectStorage.
Class
- LocaleProjectStorage
- Provides the locale project storage system using a key value store.
Namespace
Drupal\localeCode
public function get($key, $default = NULL) {
$values = $this
->getMultiple(array(
$key,
));
return isset($values[$key]) ? $values[$key] : $default;
}