function ConfigImporter::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Config/ConfigImporter.php \Drupal\Core\Config\ConfigImporter::__construct()
  2. 10 core/lib/Drupal/Core/Config/ConfigImporter.php \Drupal\Core\Config\ConfigImporter::__construct()
  3. 9 core/lib/Drupal/Core/Config/ConfigImporter.php \Drupal\Core\Config\ConfigImporter::__construct()
  4. 8.9.x core/lib/Drupal/Core/Config/ConfigImporter.php \Drupal\Core\Config\ConfigImporter::__construct()

Constructs a configuration import object.

Parameters

\Drupal\Core\Config\StorageComparerInterface $storageComparer: A storage comparer object used to determine configuration changes and access the source and target storage objects.

\Symfony\Contracts\EventDispatcher\EventDispatcherInterface $eventDispatcher: The event dispatcher used to notify subscribers of config import events.

\Drupal\Core\Config\ConfigManagerInterface $configManager: The configuration manager.

\Drupal\Core\Lock\LockBackendInterface $lock: The lock backend to ensure multiple imports do not occur at the same time.

\Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager: The typed configuration manager.

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

\Drupal\Core\Extension\ModuleInstallerInterface $moduleInstaller: The module installer.

\Drupal\Core\Extension\ThemeHandlerInterface $themeHandler: The theme handler.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.

\Drupal\Core\Extension\ModuleExtensionList $moduleExtensionList: The module extension list.

\Drupal\Core\Extension\ThemeExtensionList $themeExtensionList: The theme extension list.

File

core/lib/Drupal/Core/Config/ConfigImporter.php, line 136

Class

ConfigImporter
Defines a configuration importer.

Namespace

Drupal\Core\Config

Code

public function __construct(protected StorageComparerInterface $storageComparer, protected EventDispatcherInterface $eventDispatcher, protected ConfigManagerInterface $configManager, protected LockBackendInterface $lock, protected TypedConfigManagerInterface $typedConfigManager, protected ModuleHandlerInterface $moduleHandler, protected ModuleInstallerInterface $moduleInstaller, protected ThemeHandlerInterface $themeHandler, TranslationInterface $string_translation, protected ModuleExtensionList $moduleExtensionList, protected ThemeExtensionList $themeExtensionList) {
  $this->stringTranslation = $string_translation;
  foreach ($this->storageComparer
    ->getAllCollectionNames() as $collection) {
    $this->processedConfiguration[$collection] = $this->storageComparer
      ->getEmptyChangelist();
  }
  $this->processedExtensions = $this->getEmptyExtensionsProcessedList();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.