public function ConfigEventsSubscriber::onSavingConfig in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 src/EventSubscriber/ConfigEventsSubscriber.php \Drupal\tmgmt_smartling\EventSubscriber\ConfigEventsSubscriber::onSavingConfig()
Subscriber Callback for the event.
Parameters
ConfigCrudEvent $event:
File
- src/
EventSubscriber/ ConfigEventsSubscriber.php, line 44
Class
- ConfigEventsSubscriber
- Class ConfigEventsSubscriber.
Namespace
Drupal\tmgmt_smartling\EventSubscriberCode
public function onSavingConfig(ConfigCrudEvent $event) {
$config_data = $event
->getConfig()
->get();
if (!empty($config_data["plugin"]) && $config_data["plugin"] == "smartling" && !empty($config_data["settings"]["project_id"])) {
$this->cacheInvalidator
->invalidateTags([
"tmgmt_smartling:firebase_config:{$config_data["settings"]["project_id"]}",
]);
}
}