Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Config/ConfigFactory.php \Drupal\Core\Config\ConfigFactory::loadOverrides()
  2. 9 core/lib/Drupal/Core/Config/ConfigFactory.php \Drupal\Core\Config\ConfigFactory::loadOverrides()

Get arbitrary overrides for the named configuration objects from modules.

Parameters

array $names: The names of the configuration objects to get overrides for.

Return value

array An array of overrides keyed by the configuration object name.

2 calls to ConfigFactory::loadOverrides()
ConfigFactory::doGet in core/lib/Drupal/Core/Config/ConfigFactory.php
Returns a configuration object for a given name.
ConfigFactory::doLoadMultiple in core/lib/Drupal/Core/Config/ConfigFactory.php
Returns a list of configuration objects for the given names.

File

core/lib/Drupal/Core/Config/ConfigFactory.php, line 204

Class

ConfigFactory
Defines the configuration object factory.

Namespace

Drupal\Core\Config

Code

protected function loadOverrides(array $names) {
  $overrides = [];
  foreach ($this->configFactoryOverrides as $override) {

    // Existing overrides take precedence since these will have been added
    // by events with a higher priority.
    $overrides = NestedArray::mergeDeepArray([
      $override
        ->loadOverrides($names),
      $overrides,
    ], TRUE);
  }
  return $overrides;
}