public function LanguageConfigFactoryOverride::onConfigDelete in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::onConfigDelete()
Actions to be performed to configuration override on configuration delete.
Parameters
\Drupal\Core\Config\ConfigCrudEvent $event: The config CRUD event.
Overrides ConfigFactoryOverrideBase::onConfigDelete
File
- core/
modules/ language/ src/ Config/ LanguageConfigFactoryOverride.php, line 215 - Contains \Drupal\language\Config\LanguageConfigFactoryOverride.
Class
- LanguageConfigFactoryOverride
- Provides language overrides for the configuration factory.
Namespace
Drupal\language\ConfigCode
public function onConfigDelete(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()) {
$config_translation
->delete();
}
}
}