You are here

public function ConfigUpdater::isModified in Commerce Core 8.2

Checks whether the configuration was modified since the initial import.

Parameters

array $config: The configuration data.

Return value

bool TRUE if the configuration was modified, FALSE otherwise.

Overrides ConfigUpdaterInterface::isModified

1 call to ConfigUpdater::isModified()
ConfigUpdater::revert in src/Config/ConfigUpdater.php
Reverts configuration to the values from extension storage.

File

src/Config/ConfigUpdater.php, line 223

Class

ConfigUpdater
Default implementation of the ConfigUpdaterInterface.

Namespace

Drupal\commerce\Config

Code

public function isModified(array $config) {
  $original_hash = $config['_core']['default_config_hash'];

  // Create a new hash based on current values.
  unset($config['uuid']);
  unset($config['_core']);
  $current_hash = Crypt::hashBase64(serialize($config));
  return $original_hash !== $current_hash;
}