You are here

public function ConfigOverride::loadOverrides in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Installer/ConfigOverride.php \Drupal\Core\Installer\ConfigOverride::loadOverrides()

Returns config overrides.

Parameters

array $names: A list of configuration names that are being loaded.

Return value

array An array keyed by configuration name of override data. Override data contains a nested array structure of overrides.

Overrides ConfigFactoryOverrideInterface::loadOverrides

File

core/lib/Drupal/Core/Installer/ConfigOverride.php, line 29

Class

ConfigOverride
Override configuration during the installer.

Namespace

Drupal\Core\Installer

Code

public function loadOverrides($names) {
  $overrides = [];
  if (InstallerKernel::installationAttempted() && function_exists('drupal_install_profile_distribution_name')) {

    // Early in the installer the site name is unknown. In this case we need
    // to fallback to the distribution's name.
    $overrides['system.site'] = [
      'name' => drupal_install_profile_distribution_name(),
    ];
  }
  return $overrides;
}