You are here

public function StorageReplaceDataWrapper::readMultiple in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/config/src/StorageReplaceDataWrapper.php \Drupal\config\StorageReplaceDataWrapper::readMultiple()
  2. 10 core/modules/config/src/StorageReplaceDataWrapper.php \Drupal\config\StorageReplaceDataWrapper::readMultiple()

Reads configuration data from the storage.

Parameters

array $names: List of names of the configuration objects to load.

Return value

array A list of the configuration data stored for the configuration object name that could be loaded for the passed list of names.

Overrides StorageInterface::readMultiple

File

core/modules/config/src/StorageReplaceDataWrapper.php, line 70

Class

StorageReplaceDataWrapper
Wraps a configuration storage to allow replacing specific configuration data.

Namespace

Drupal\config

Code

public function readMultiple(array $names) {
  $data = $this->storage
    ->readMultiple($names);
  foreach ($names as $name) {
    if (isset($this->replacementData[$this->collection][$name])) {
      $data[$name] = $this->replacementData[$this->collection][$name];
    }
  }
  return $data;
}