function LanguageConfigFactoryOverride::onConfigSave

Same name in other branches
  1. 9 core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::onConfigSave()
  2. 8.9.x core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::onConfigSave()
  3. 10 core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::onConfigSave()

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\Config

Code

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);
        }
    }
}

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