class ConfigReadonlyServiceProvider in Configuration Read-only mode 8
Same name and namespace in other branches
- 7 lib/Drupal/config_readonly/ConfigReadonlyServiceProvider.php \Drupal\config_readonly\ConfigReadonlyServiceProvider
Overrides CMI storage.
Hierarchy
- class \Drupal\config_readonly\ConfigReadonlyServiceProvider implements ServiceModifierInterface, ServiceProviderInterface
Expanded class hierarchy of ConfigReadonlyServiceProvider
File
- src/
ConfigReadonlyServiceProvider.php, line 14
Namespace
Drupal\config_readonlyView source
class ConfigReadonlyServiceProvider implements ServiceProviderInterface, ServiceModifierInterface {
/**
* {@inheritdoc}
*/
public function register(ContainerBuilder $container) {
}
/**
* {@inheritdoc}
*/
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'),
]);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigReadonlyServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceModifierInterface:: |
|
ConfigReadonlyServiceProvider:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |