public function ConfigSubscriber::onConfigSave in Field Encryption 3.0.x
Same name and namespace in other branches
- 8.2 src/EventSubscriber/ConfigSubscriber.php \Drupal\field_encrypt\EventSubscriber\ConfigSubscriber::onConfigSave()
React on the configuration save event.
@todo why is this not just using hook_field_storage_update?
Parameters
\Drupal\Core\Config\ConfigCrudEvent $event: The configuration event.
File
- src/
EventSubscriber/ ConfigSubscriber.php, line 94
Class
- ConfigSubscriber
- Updates existing data when field encryption settings are updated.
Namespace
Drupal\field_encrypt\EventSubscriberCode
public function onConfigSave(ConfigCrudEvent $event) {
$config = $event
->getConfig();
if (substr($config
->getName(), 0, 14) == 'field.storage.') {
$this
->onFieldStorageChange($config);
}
if (!$config
->isNew() && $config
->getName() === 'field_encrypt.settings') {
$this
->onFieldEncryptSettingsChange($config);
}
}