Gets locale wrapper with typed configuration data.
string $name: Configuration object name.
\Drupal\locale\LocaleTypedConfig Locale-wrapped configuration element.
Overrides TypedConfigManager::get
public function get($name) {
// Read default and current configuration data.
$default = $this->installStorage
->read($name);
$updated = $this->configStorage
->read($name);
// We get only the data that didn't change from default.
$data = $this
->compareConfigData($default, $updated);
$definition = $this
->getDefinition($name);
// Unless the configuration has a explicit language code we assume English.
$langcode = isset($default['langcode']) ? $default['langcode'] : 'en';
$wrapper = new LocaleTypedConfig($definition, $name, $langcode, $this);
$wrapper
->setValue($data);
return $wrapper;
}