1 config.sync.inc config_sync_batch($config_statuses = NULL)

Return an array for setting up a Batch API job to sync all configuration.

File

core/modules/config/config.sync.inc, line 6

Code

function config_sync_batch($config_statuses = NULL) {
  if (empty($config_statuses)) {
    $config_statuses = config_get_statuses();
  }
  $operations[] = array('_config_sync_start', array($config_statuses));
  $operations[] = array('_config_sync_validate', array());
  $operations[] = array('_config_sync_import', array());
  $batch = array(
    'operations' => $operations,
    'title' => t('Importing configuration'),
    'init_message' => t('Starting import'),
    'error_message' => t('An error occurred while importing the configuration.'),
    'file' => backdrop_get_path('module', 'config') . '/config.sync.inc',
    'finished' => '_config_sync_finished',
  );
  return $batch;
}