You are here

public function ConfigProviderBase::addDefaultConfigHash in Configuration Provider 8.2

Adds default_config_hash for proper localization of the config objects.

Use this method only on unchanged config from config/install or config/optional folders.

Parameters

array $data: Config to install read directly from config/install or config/optional.

Return value

array Config with default_config_hash property.

2 calls to ConfigProviderBase::addDefaultConfigHash()
ConfigProviderInstall::addInstallableConfig in src/Plugin/ConfigProvider/ConfigProviderInstall.php
Adds configuration that is available to be installed or updated.
ConfigProviderOptional::addInstallableConfig in src/Plugin/ConfigProvider/ConfigProviderOptional.php
Adds configuration that is available to be installed or updated.

File

src/Plugin/ConfigProviderBase.php, line 308

Class

ConfigProviderBase
Base class for Configuration provider plugins.

Namespace

Drupal\config_provider\Plugin

Code

public function addDefaultConfigHash(array $data) {
  if (empty($data['_core']['default_config_hash'])) {
    $data['_core']['default_config_hash'] = Crypt::hashBase64(serialize($data));
  }
  return $data;
}