You are here

public function MigrateBatchController::migrate in Workbench Moderation to Content Moderation 8

Set the batch tasks and trigger batch process.

1 string reference to 'MigrateBatchController::migrate'
wbm2cm.routing.yml in ./wbm2cm.routing.yml
wbm2cm.routing.yml

File

src/Controller/MigrateBatchController.php, line 42

Class

MigrateBatchController
Batch process the WBM to CM migration.

Namespace

Drupal\wbm2cm\Controller

Code

public function migrate() {
  $batch = [
    'title' => t('Migrating WBM to CM'),
    'operations' => [
      [
        'wbm2cm_step1',
        [],
      ],
      [
        'wbm2cm_step2',
        [],
      ],
      [
        'wbm2cm_step3',
        [],
      ],
      [
        'wbm2cm_step4',
        [],
      ],
      [
        'wbm2cm_step5',
        [],
      ],
      [
        'wbm2cm_step6',
        [],
      ],
      [
        'wbm2cm_step7',
        [],
      ],
      [
        'wbm2cm_step8',
        [],
      ],
    ],
    'finished' => 'wbm2cm_migrate_finished_callback',
    'file' => drupal_get_path('module', 'wbm2cm') . '/wbm2cm.migrate.inc',
  ];
  batch_set($batch);
  return batch_process();
}