ConfigSync::processBatch

public static ConfigSync::processBatch(ConfigImporter $config_importer, $sync_step, &$context)

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.

File

core/modules/config/src/Form/ConfigSync.php, line 371

Class

ConfigSync
Construct the storage changes in a configuration synchronization form.

Namespace

Drupal\config\Form

Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
public static function processBatch(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'] = array();
    }
    $context['results']['errors'] += $errors;
  }
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.