ConfigReadonlyServiceProvider.php in Configuration Read-only mode 7
Namespace
Drupal\config_readonlyFile
lib/Drupal/config_readonly/ConfigReadonlyServiceProvider.phpView source
<?php
/**
* @file
* Contains \Drupal\config_readonly\ConfigReadonlyServiceProvider.
*/
namespace Drupal\config_readonly;
use Symfony\Component\DependencyInjection\Reference;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceModifierInterface;
use Drupal\Core\DependencyInjection\ServiceProviderInterface;
/**
* Overrides CMI storage.
*/
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');
}
}
}
Classes
Name | Description |
---|---|
ConfigReadonlyServiceProvider | Overrides CMI storage. |