You are here

protected function ConfigSubscriber::encryptionConfigChanged in Field Encryption 8.2

Check whether the field encryption config has changed.

Parameters

\Drupal\Core\Config\Config $config: The config to check.

Return value

bool Whether the config has changed.

1 call to ConfigSubscriber::encryptionConfigChanged()
ConfigSubscriber::onConfigSave in src/EventSubscriber/ConfigSubscriber.php
React on the configuration save event.

File

src/EventSubscriber/ConfigSubscriber.php, line 198

Class

ConfigSubscriber
Updates existing data when field encryption settings are updated.

Namespace

Drupal\field_encrypt\EventSubscriber

Code

protected function encryptionConfigChanged(Config $config) {

  // Get both the newly saved and original field_encrypt configuration.
  $new_config = $config
    ->get('third_party_settings.field_encrypt');
  $original_config = $config
    ->getOriginal('third_party_settings.field_encrypt');

  // Don't compare 'uncacheable' setting.
  unset($new_config['uncacheable']);
  unset($original_config['uncacheable']);
  return $new_config !== $original_config;
}