function StorableConfigBase::initWithData

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/StorableConfigBase.php \Drupal\Core\Config\StorableConfigBase::initWithData()
  2. 8.9.x core/lib/Drupal/Core/Config/StorableConfigBase.php \Drupal\Core\Config\StorableConfigBase::initWithData()
  3. 11.x core/lib/Drupal/Core/Config/StorableConfigBase.php \Drupal\Core\Config\StorableConfigBase::initWithData()

Initializes a configuration object with pre-loaded data.

Parameters

array $data: Array of loaded data for this configuration object.

Return value

$this The configuration object.

1 call to StorableConfigBase::initWithData()
Config::initWithData in core/lib/Drupal/Core/Config/Config.php
Initializes a configuration object with pre-loaded data.
1 method overrides StorableConfigBase::initWithData()
Config::initWithData in core/lib/Drupal/Core/Config/Config.php
Initializes a configuration object with pre-loaded data.

File

core/lib/Drupal/Core/Config/StorableConfigBase.php, line 98

Class

StorableConfigBase
Provides a base class for configuration objects with storage support.

Namespace

Drupal\Core\Config

Code

public function initWithData(array $data) {
    $this->isNew = FALSE;
    $this->data = $data;
    $this->originalData = $this->data;
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.