function ConfigBase::setData
Same name in other branches
- 9 core/lib/Drupal/Core/Config/ConfigBase.php \Drupal\Core\Config\ConfigBase::setData()
- 8.9.x core/lib/Drupal/Core/Config/ConfigBase.php \Drupal\Core\Config\ConfigBase::setData()
- 10 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.
1 call to ConfigBase::setData()
- 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 159
Class
- ConfigBase
- Provides a base class for configuration objects with get/set support.
Namespace
Drupal\Core\ConfigCode
public function setData(array $data) {
$data = $this->castSafeStrings($data);
$this->validateKeys($data);
$this->data = $data;
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.