You are here

public static function Migration::runActiveStep in CMS Content Sync 2.0.x

Same name and namespace in other branches
  1. 2.1.x src/Controller/Migration.php \Drupal\cms_content_sync\Controller\Migration::runActiveStep()

File

src/Controller/Migration.php, line 286

Class

Migration
Migration Embed provides methods and a UI to migrate from Content Sync v1 to Content Sync v2.

Namespace

Drupal\cms_content_sync\Controller

Code

public static function runActiveStep() {
  $step = self::getActiveStep();
  if (self::STEP_EXPORT_POOLS === $step) {
    self::runPoolExport();
  }
  elseif (self::STEP_EXPORT_FLOWS === $step) {
    self::runFlowExport();
  }
  elseif (self::STEP_SWITCH === $step) {
    self::runSwitch();
  }
  else {
    throw new \Exception("This migration step can't be automated.");
  }
}