You are here

public function ConfigReadonlyStorage::__construct in Configuration Read-only mode 8

Constructs a new ConfigReadonlyStorage.

Parameters

\Drupal\Core\Config\StorageInterface $storage: A configuration storage to be cached.

\Drupal\Core\Cache\CacheBackendInterface $cache: A cache backend used to store configuration.

\Drupal\Core\Lock\LockBackendInterface $lock: The lock backend to check if config imports are in progress.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke hooks.

Overrides CachedStorage::__construct

File

src/Config/ConfigReadonlyStorage.php, line 54

Class

ConfigReadonlyStorage
Defines a config read-only storage controller.

Namespace

Drupal\config_readonly\Config

Code

public function __construct(StorageInterface $storage, CacheBackendInterface $cache, LockBackendInterface $lock, RequestStack $request_stack, ModuleHandlerInterface $module_handler) {
  parent::__construct($storage, $cache);
  $this->lock = $lock;
  $this->requestStack = $request_stack;
  $this
    ->setModuleHandler($module_handler);
}