public function ConfigImporter::__construct

Constructs a configuration import object.

Parameters

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

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

\Drupal\Core\Config\ConfigFactory $config_factory: The config factory that statically caches config objects.

\Drupal\Core\Entity\EntityManager $entity_manager: The entity manager used to import config entities.

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

File

drupal/core/lib/Drupal/Core/Config/ConfigImporter.php, line 112
Contains \Drupal\Core\Config\ConfigImporter.

Class

ConfigImporter
Defines a configuration importer.

Namespace

Drupal\Core\Config

Code

public function __construct(StorageComparerInterface $storage_comparer, EventDispatcherInterface $event_dispatcher, ConfigFactory $config_factory, EntityManager $entity_manager, LockBackendInterface $lock) {
  $this->storageComparer = $storage_comparer;
  $this->eventDispatcher = $event_dispatcher;
  $this->configFactory = $config_factory;
  $this->entityManager = $entity_manager;
  $this->lock = $lock;
  $this->processed = $this->storageComparer
    ->getEmptyChangelist();

  // Use an override free context for importing so that overrides to do not
  // pollute the imported data. The context is hard coded to ensure this is
  // the case.
  $this->context = new FreeConfigContext($this->eventDispatcher);
}