You are here

public function ConfigFactoryWrapper::loadMultiple in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Config/ConfigFactoryWrapper.php \Drupal\webprofiler\Config\ConfigFactoryWrapper::loadMultiple()
  2. 8.2 webprofiler/src/Config/ConfigFactoryWrapper.php \Drupal\webprofiler\Config\ConfigFactoryWrapper::loadMultiple()
  3. 4.x webprofiler/src/Config/ConfigFactoryWrapper.php \Drupal\webprofiler\Config\ConfigFactoryWrapper::loadMultiple()

Returns a list of configuration objects for the given names.

This will pre-load all requested configuration objects does not create new configuration objects. This method always return immutable objects. ConfigFactoryInterface::getEditable() should be used to retrieve mutable configuration objects, one by one.

Parameters

array $names: List of names of configuration objects.

Return value

\Drupal\Core\Config\ImmutableConfig[] List of successfully loaded configuration objects, keyed by name.

Overrides ConfigFactory::loadMultiple

File

webprofiler/src/Config/ConfigFactoryWrapper.php, line 30

Class

ConfigFactoryWrapper
Wraps a config factory to be able to figure out all used config files.

Namespace

Drupal\webprofiler\Config

Code

public function loadMultiple(array $names) {
  $result = parent::loadMultiple($names);
  foreach (array_keys($result) as $name) {
    $this->dataCollector
      ->addConfigName($name);
  }
  return $result;
}