function LocaleConfigManager::getTranslatableDefaultConfig
Same name in other branches
- 9 core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::getTranslatableDefaultConfig()
- 8.9.x core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::getTranslatableDefaultConfig()
- 11.x core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::getTranslatableDefaultConfig()
Gets array of translated strings for Locale translatable configuration.
Parameters
string $name: Configuration object name.
Return value
array Array of Locale translatable elements of the default configuration in $name.
1 call to LocaleConfigManager::getTranslatableDefaultConfig()
- LocaleConfigManager::updateConfigTranslations in core/
modules/ locale/ src/ LocaleConfigManager.php - Updates all configuration translations for the names / languages provided.
File
-
core/
modules/ locale/ src/ LocaleConfigManager.php, line 139
Class
- LocaleConfigManager
- Manages configuration supported in part by interface translation.
Namespace
Drupal\localeCode
public function getTranslatableDefaultConfig($name) {
if ($this->isSupported($name)) {
// Create typed configuration wrapper based on install storage data.
$data = $this->defaultConfigStorage
->read($name);
$typed_config = $this->typedConfigManager
->createFromNameAndData($name, $data);
if ($typed_config instanceof TraversableTypedDataInterface) {
return $this->getTranslatableData($typed_config);
}
}
return [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.