You are here

public function ConfigBase::setData in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Config/ConfigBase.php \Drupal\Core\Config\ConfigBase::setData()

Replaces the data of this configuration object.

Parameters

array $data: The new configuration data.

Return value

$this The configuration object.

Throws

\Drupal\Core\Config\ConfigValueException If any key in $data in any depth contains a dot.

2 calls to ConfigBase::setData()
Config::setData in core/lib/Drupal/Core/Config/Config.php
Replaces the data of this configuration object.
ConfigBase::merge in core/lib/Drupal/Core/Config/ConfigBase.php
Merges data into a configuration object.
1 method overrides ConfigBase::setData()
Config::setData in core/lib/Drupal/Core/Config/Config.php
Replaces the data of this configuration object.

File

core/lib/Drupal/Core/Config/ConfigBase.php, line 164
Contains \Drupal\Core\Config\ConfigBase.

Class

ConfigBase
Provides a base class for configuration objects with get/set support.

Namespace

Drupal\Core\Config

Code

public function setData(array $data) {
  $data = $this
    ->castSafeStrings($data);
  $this
    ->validateKeys($data);
  $this->data = $data;
  return $this;
}