You are here

function content_export_yaml_block_cim_index_batch_process in Content Export YAML 8

1 string reference to 'content_export_yaml_block_cim_index_batch_process'
drush_content_export_yaml_cim_block in drush/content_export_yaml.drush.inc

File

drush/content_export_yaml.batch.inc, line 72

Code

function content_export_yaml_block_cim_index_batch_process($info, $context) {
  try {
    $export = new ContentExport();
    $status = $export
      ->import($info['id'], 'block_content', $info['type']);
    if ($status) {
      drush_print('Success imported id = ' . $info['index']);
    }
  } catch (\Exception $e) {
    $message = "Item :" . $info['index'] . " Error: " . $e
      ->getMessage();
    \Drupal::logger("content_export")
      ->error($message);
  }
}