You are here

protected function ConfigImporterTrait::getConfigImporterFromComparer in Configuration Split 2.0.x

Get a config importer from a storage comparer.

Parameters

\Drupal\Core\Config\StorageComparerInterface $storageComparer: A storage comparer to pass to the config importer.

Return value

\Drupal\Core\Config\ConfigImporter The config importer.

3 calls to ConfigImporterTrait::getConfigImporterFromComparer()
ConfigImporterTrait::getConfigImporterFromStorage in src/Config/ConfigImporterTrait.php
Get a config importer from a storage to sync import.
ConfigImportFormTrait::launchImport in src/Form/ConfigImportFormTrait.php
ConfigSplitCliService::import in src/ConfigSplitCliService.php
Import the configuration.

File

src/Config/ConfigImporterTrait.php, line 31

Class

ConfigImporterTrait
The ConfigImporterTrait helps us to create a ConfigImporter.

Namespace

Drupal\config_split\Config

Code

protected function getConfigImporterFromComparer(StorageComparerInterface $storageComparer) : ConfigImporter {
  $container = \Drupal::getContainer();
  return new ConfigImporter($storageComparer, $container
    ->get('event_dispatcher'), $container
    ->get('config.manager'), $container
    ->get('lock.persistent'), $container
    ->get('config.typed'), $container
    ->get('module_handler'), $container
    ->get('module_installer'), $container
    ->get('theme_handler'), $container
    ->get('string_translation'), $container
    ->get('extension.list.module'));
}