public function ConfigReadonlyServiceProvider::alter in Configuration Read-only mode 8
Same name and namespace in other branches
- 7 lib/Drupal/config_readonly/ConfigReadonlyServiceProvider.php \Drupal\config_readonly\ConfigReadonlyServiceProvider::alter()
Modifies existing service definitions.
Parameters
ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.
Overrides ServiceModifierInterface::alter
File
- src/
ConfigReadonlyServiceProvider.php, line 24
Class
- ConfigReadonlyServiceProvider
- Overrides CMI storage.
Namespace
Drupal\config_readonlyCode
public function alter(ContainerBuilder $container) {
if ($container
->getParameter('kernel.environment') !== 'install') {
$definition = $container
->getDefinition('config.storage');
$definition
->setClass('Drupal\\config_readonly\\Config\\ConfigReadonlyStorage');
$definition
->setArguments([
new Reference('config.storage.active'),
new Reference('cache.config'),
new Reference('lock'),
new Reference('request_stack'),
new Reference('module_handler'),
]);
}
}