class ConfigOverride
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Installer/ConfigOverride.php \Drupal\Core\Installer\ConfigOverride
- 10 core/lib/Drupal/Core/Installer/ConfigOverride.php \Drupal\Core\Installer\ConfigOverride
- 11.x core/lib/Drupal/Core/Installer/ConfigOverride.php \Drupal\Core\Installer\ConfigOverride
Override configuration during the installer.
Hierarchy
- class \Drupal\Core\Installer\ConfigOverride implements \Drupal\Core\DependencyInjection\ServiceProviderInterface, \Drupal\Core\Config\ConfigFactoryOverrideInterface
Expanded class hierarchy of ConfigOverride
File
-
core/
lib/ Drupal/ Core/ Installer/ ConfigOverride.php, line 14
Namespace
Drupal\Core\InstallerView source
class ConfigOverride implements ServiceProviderInterface, ConfigFactoryOverrideInterface {
/**
* {@inheritdoc}
*/
public function register(ContainerBuilder $container) {
// Register this class so that it can override configuration.
$container->register('core.install_config_override', static::class)
->addTag('config.factory.override');
}
/**
* {@inheritdoc}
*/
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;
}
/**
* {@inheritdoc}
*/
public function getCacheSuffix() {
return 'core.install_config_override';
}
/**
* {@inheritdoc}
*/
public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
return NULL;
}
/**
* {@inheritdoc}
*/
public function getCacheableMetadata($name) {
return new CacheableMetadata();
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
ConfigOverride::createConfigObject | public | function | Creates a configuration object for use during install and synchronization. | Overrides ConfigFactoryOverrideInterface::createConfigObject |
ConfigOverride::getCacheableMetadata | public | function | Gets the cacheability metadata associated with the config factory override. | Overrides ConfigFactoryOverrideInterface::getCacheableMetadata |
ConfigOverride::getCacheSuffix | public | function | The string to append to the configuration static cache name. | Overrides ConfigFactoryOverrideInterface::getCacheSuffix |
ConfigOverride::loadOverrides | public | function | Returns config overrides. | Overrides ConfigFactoryOverrideInterface::loadOverrides |
ConfigOverride::register | public | function | Registers services to the container. | Overrides ServiceProviderInterface::register |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.