function ConfigImporter::reInjectMe

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

Gets all the service dependencies from \Drupal.

Since the ConfigImporter handles module installation the kernel and the container can be rebuilt and altered during processing. It is necessary to keep the services used by the importer in sync.

1 call to ConfigImporter::reInjectMe()
ConfigImporter::processExtension in core/lib/Drupal/Core/Config/ConfigImporter.php
Processes an extension change.

File

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

Class

ConfigImporter
Defines a configuration importer.

Namespace

Drupal\Core\Config

Code

protected function reInjectMe() {
    // When rebuilding the container,
    // \Drupal\Core\DrupalKernel::initializeContainer() saves the hashes of the
    // old container and passes them to the new one. So __sleep() will
    // recognize the old services and then __wakeup() will restore them from
    // the new container.
    $this->__sleep();
    $this->__wakeup();
    $this->storageComparer
        ->__sleep();
    $this->storageComparer
        ->__wakeup();
}

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