Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ConfigBase.php

function 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.

3 calls to ConfigBase::setData()
Config::setData in core/lib/Drupal/Core/Config/Config.php
Replaces the data of this configuration object.
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 159

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal