You are here

public static function Migration::skipFlowsTest in CMS Content Sync 2.1.x

Same name and namespace in other branches
  1. 2.0.x src/Controller/Migration.php \Drupal\cms_content_sync\Controller\Migration::skipFlowsTest()
1 call to Migration::skipFlowsTest()
MigrationForm::submitForm in src/Form/MigrationForm.php
Form submission handler.

File

src/Controller/Migration.php, line 229

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 skipFlowsTest($machine_names) {
  self::useV2(true);

  // TODO: Use batch operation.
  foreach (Flow::getAll() as $flow) {
    if (in_array($flow
      ->id(), $machine_names)) {
      $status = self::getStoredFlowStatus($flow
        ->id());
      $status['skipTest'] = true;
      self::setFlowStatus($flow
        ->id(), $status);
    }
  }
  \Drupal::messenger()
    ->addMessage(t('Successfully skipped testing your Flow(s).'));
}