You are here

public function TypedConfigManager::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Config/TypedConfigManager.php \Drupal\Core\Config\TypedConfigManager::__construct()

Creates a new typed configuration manager.

Parameters

\Drupal\Core\Config\StorageInterface $configStorage: The storage object to use for reading schema data

\Drupal\Core\Config\StorageInterface $schemaStorage: The storage object to use for reading schema data

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend to use for caching the definitions.

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

\Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver: (optional) The class resolver.

Overrides TypedDataManager::__construct

File

core/lib/Drupal/Core/Config/TypedConfigManager.php, line 54

Class

TypedConfigManager
Manages config schema type plugins.

Namespace

Drupal\Core\Config

Code

public function __construct(StorageInterface $configStorage, StorageInterface $schemaStorage, CacheBackendInterface $cache, ModuleHandlerInterface $module_handler, ClassResolverInterface $class_resolver = NULL) {
  $this->configStorage = $configStorage;
  $this->schemaStorage = $schemaStorage;
  $this
    ->setCacheBackend($cache, 'typed_config_definitions');
  $this
    ->alterInfo('config_schema_info');
  $this->moduleHandler = $module_handler;
  $this->classResolver = $class_resolver ?: \Drupal::service('class_resolver');
}