function ConfigImporter::import

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

Imports the changelist to the target storage.

Return value

$this The ConfigImporter instance.

Throws

\Drupal\Core\Config\ConfigException

File

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

Class

ConfigImporter
Defines a configuration importer.

Namespace

Drupal\Core\Config

Code

public function import() {
    if ($this->hasUnprocessedConfigurationChanges()) {
        $sync_steps = $this->initialize();
        foreach ($sync_steps as $step) {
            $context = [];
            do {
                $this->doSyncStep($step, $context);
            } while ($context['finished'] < 1);
        }
    }
    return $this;
}

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