You are here

public static function Migration::alwaysUseV2 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::alwaysUseV2()
20 calls to Migration::alwaysUseV2()
cms_content_sync_menu_local_actions_alter in ./cms_content_sync.module
CopyRemoteFlow::flowImportForm in src/Form/CopyRemoteFlow.php
Step 4: Adjust configuration before importing.
CopyRemoteFlow::flowListForm in src/Form/CopyRemoteFlow.php
Step 3: Select the remote Flow to import now.
CopyRemoteFlow::getCurrentFormStep in src/Form/CopyRemoteFlow.php
Return the current step of our multi-step form.
CopyRemoteFlow::poolsForm in src/Form/CopyRemoteFlow.php
Step 2: Select pools to look for existing flows for.

... See full list

File

src/Controller/Migration.php, line 53

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 alwaysUseV2() {
  static $value = null;

  // TODO: When switching, cache statically that we're using v2. When a user
  //   creates a Flow with v2 and there is no other Flow, set the value
  //   statically as well to cover new installations. We can't set it on
  //   module install though as customers who import flow and pool config
  //   afterwards would incorrectly use v2 and we might mess up deployments.
  if (null === $value) {
    $active_step = self::getActiveStep(true);
    $value = self::STEP_DONE === $active_step;
  }
  return $value;
}