public function LanguageConfigFactoryOverride::onConfigSave in Drupal 10
Same name and namespace in other branches
- 8 core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::onConfigSave()
- 9 core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::onConfigSave()
Actions to be performed to configuration override on configuration save.
Parameters
\Drupal\Core\Config\ConfigCrudEvent $event: The config CRUD event.
Overrides ConfigFactoryOverrideBase::onConfigSave
File
- core/
modules/ language/ src/ Config/ LanguageConfigFactoryOverride.php, line 175
Class
- LanguageConfigFactoryOverride
- Provides language overrides for the configuration factory.
Namespace
Drupal\language\ConfigCode
public function onConfigSave(ConfigCrudEvent $event) {
$config = $event
->getConfig();
$name = $config
->getName();
foreach (\Drupal::languageManager()
->getLanguages() as $language) {
$config_translation = $this
->getOverride($language
->getId(), $name);
if (!$config_translation
->isNew()) {
$this
->filterOverride($config, $config_translation);
}
}
}