public function LanguageConfigEventSubscriber::configDelete in Tome 8
Reacts to delete event.
Parameters
\Drupal\language\Config\LanguageConfigOverrideCrudEvent $event: The configuration event.
File
- modules/
tome_sync/ src/ EventSubscriber/ LanguageConfigEventSubscriber.php, line 55
Class
- LanguageConfigEventSubscriber
- Keeps the config export directory synced with language config operations.
Namespace
Drupal\tome_sync\EventSubscriberCode
public function configDelete(LanguageConfigOverrideCrudEvent $event) {
if (!\Drupal::isConfigSyncing()) {
$override = $event
->getLanguageConfigOverride();
$collection = $this->configStorage
->createCollection($override
->getStorage()
->getCollectionName());
$name = $override
->getName();
$collection
->delete($name);
}
}