function LocaleProjectStorage::get

Same name in other branches
  1. 9 core/modules/locale/src/LocaleProjectStorage.php \Drupal\locale\LocaleProjectStorage::get()
  2. 10 core/modules/locale/src/LocaleProjectStorage.php \Drupal\locale\LocaleProjectStorage::get()
  3. 11.x core/modules/locale/src/LocaleProjectStorage.php \Drupal\locale\LocaleProjectStorage::get()

Overrides LocaleProjectStorageInterface::get

File

core/modules/locale/src/LocaleProjectStorage.php, line 46

Class

LocaleProjectStorage
Provides the locale project storage system using a key value store.

Namespace

Drupal\locale

Code

public function get($key, $default = NULL) {
    $values = $this->getMultiple([
        $key,
    ]);
    return isset($values[$key]) ? $values[$key] : $default;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.