function ConfigManager::__construct
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Config/ConfigManager.php \Drupal\Core\Config\ConfigManager::__construct()
- 10 core/lib/Drupal/Core/Config/ConfigManager.php \Drupal\Core\Config\ConfigManager::__construct()
- 11.x core/lib/Drupal/Core/Config/ConfigManager.php \Drupal\Core\Config\ConfigManager::__construct()
Creates ConfigManager objects.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.
\Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager: The typed config manager.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.
\Drupal\Core\Config\StorageInterface $active_storage: The active configuration storage.
\Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.
\Drupal\Core\Extension\ExtensionPathResolver $extension_path_resolver: The extension path resolver.
File
-
core/
lib/ Drupal/ Core/ Config/ ConfigManager.php, line 108
Class
- ConfigManager
- The ConfigManager provides helper functions for the configuration system.
Namespace
Drupal\Core\ConfigCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, TranslationInterface $string_translation, StorageInterface $active_storage, EventDispatcherInterface $event_dispatcher, EntityRepositoryInterface $entity_repository, ExtensionPathResolver $extension_path_resolver = NULL) {
$this->entityTypeManager = $entity_type_manager;
$this->configFactory = $config_factory;
$this->typedConfigManager = $typed_config_manager;
$this->stringTranslation = $string_translation;
$this->activeStorage = $active_storage;
$this->eventDispatcher = $event_dispatcher;
$this->entityRepository = $entity_repository;
if (!$extension_path_resolver) {
@trigger_error('Calling ConfigManager::__construct without the $extension_path_resolver argument is deprecated in drupal:9.3.0 and is required in drupal:10.0.0. See https://www.drupal.org/node/2940438', E_USER_DEPRECATED);
$extension_path_resolver = \Drupal::service('extension.path.resolver');
}
$this->extensionPathResolver = $extension_path_resolver;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.