You are here

public static function Migration::skipFlowsPull 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::skipFlowsPull()
1 call to Migration::skipFlowsPull()
MigrationForm::submitForm in src/Form/MigrationForm.php
Form submission handler.

File

src/Controller/Migration.php, line 261

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 skipFlowsPull($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['skipPull'] = true;
      self::setFlowStatus($flow
        ->id(), $status);
    }
  }
  \Drupal::messenger()
    ->addMessage(t('Successfully skipped mapping your Flow(s).'));
}