function ConfigurableLanguageManager::saveLanguageTypesConfiguration
Same name in other branches
- 9 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::saveLanguageTypesConfiguration()
- 8.9.x core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::saveLanguageTypesConfiguration()
- 11.x core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::saveLanguageTypesConfiguration()
Overrides ConfigurableLanguageManagerInterface::saveLanguageTypesConfiguration
File
-
core/
modules/ language/ src/ ConfigurableLanguageManager.php, line 196
Class
- ConfigurableLanguageManager
- Overrides default LanguageManager to provide configured languages.
Namespace
Drupal\languageCode
public function saveLanguageTypesConfiguration(array $values) {
$config = $this->configFactory
->getEditable('language.types');
if (isset($values['configurable'])) {
$config->set('configurable', $values['configurable']);
}
if (isset($values['all'])) {
$config->set('all', $values['all']);
}
$config->save(TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.