Imports the changelist to the target storage.
\Drupal\Core\Config\ConfigImporter The ConfigImporter instance.
\Drupal\Core\Config\ConfigException
public function import() {
if ($this
->hasUnprocessedChanges()) {
// Ensure that the changes have been validated.
$this
->validate();
$this->configFactory
->enterContext($this->context);
if (!$this->lock
->acquire(static::ID)) {
// Another process is synchronizing configuration.
throw new ConfigImporterException(sprintf('%s is already importing', static::ID));
}
$this
->importInvokeOwner();
$this
->importConfig();
// Allow modules to react to a import.
$this
->notify('import');
// The import is now complete.
$this->lock
->release(static::ID);
$this
->reset();
// Leave the context used during import and clear the ConfigFactory's
// static cache.
$this->configFactory
->leaveContext()
->reset();
}
return $this;
}