public static function ConfigImporterBatch::process in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Config/Importer/ConfigImporterBatch.php \Drupal\Core\Config\Importer\ConfigImporterBatch::process()
Processes the config import batch and persists the importer.
Parameters
\Drupal\Core\Config\ConfigImporter $config_importer: The batch config importer object to persist.
string $sync_step: The synchronization step to do.
array $context: The batch context.
1 call to ConfigImporterBatch::process()
- ConfigSync::processBatch in core/
modules/ config/ src/ Form/ ConfigSync.php - Processes the config import batch and persists the importer.
File
- core/
lib/ Drupal/ Core/ Config/ Importer/ ConfigImporterBatch.php, line 25
Class
- ConfigImporterBatch
- Methods for running the ConfigImporter in a batch.
Namespace
Drupal\Core\Config\ImporterCode
public static function process(ConfigImporter $config_importer, $sync_step, &$context) {
if (!isset($context['sandbox']['config_importer'])) {
$context['sandbox']['config_importer'] = $config_importer;
}
$config_importer = $context['sandbox']['config_importer'];
$config_importer
->doSyncStep($sync_step, $context);
if ($errors = $config_importer
->getErrors()) {
if (!isset($context['results']['errors'])) {
$context['results']['errors'] = [];
}
$context['results']['errors'] = array_merge($errors, $context['results']['errors']);
}
}