public function ContactStorageSettingsFormSave::onSave in Contact Storage 8
Invalidates the entity type definition cache whenever settings are changed.
Parameters
\Drupal\Core\Config\ConfigCrudEvent $event: The Event to process.
File
- src/
EventSubscriber/ ContactStorageSettingsFormSave.php, line 20
Class
- ContactStorageSettingsFormSave
- Invalidates the entity type definition cache when the settings are changed.
Namespace
Drupal\contact_storage\EventSubscriberCode
public function onSave(ConfigCrudEvent $event) {
if ($event
->getConfig()
->getName() === 'contact_storage.settings') {
\Drupal::entityTypeManager()
->clearCachedDefinitions();
}
}