protected function Config::replaceData

Replaces the data of this configuration object.

This function is separate from setData() to avoid load() state tracking. A load() would destroy the replaced data (for example on import). Do not call set() when inside load().

Parameters

array $data: The new configuration data.

Return value

Drupal\Core\Config\Config The configuration object.

3 calls to Config::replaceData()
Config::load in drupal/core/lib/Drupal/Core/Config/Config.php
Loads configuration data into this object.
Config::merge in drupal/core/lib/Drupal/Core/Config/Config.php
Merges data into a configuration object.
Config::setData in drupal/core/lib/Drupal/Core/Config/Config.php
Replaces the data of this configuration object.

File

drupal/core/lib/Drupal/Core/Config/Config.php, line 253
Definition of Drupal\Core\Config\Config.

Class

Config
Defines the default configuration object.

Namespace

Drupal\Core\Config

Code

protected function replaceData(array $data) {
  $this->data = $data;
  $this
    ->resetOverriddenData();
  return $this;
}