You are here

public static function Migration::useV2 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::useV2()
14 calls to Migration::useV2()
Embed::site in src/Controller/Embed.php
EntityHandlerBase::setDateProperty in src/Plugin/EntityHandlerBase.php
Flow::useV2 in src/Entity/Flow.php
Migration::runFlowExport in src/Controller/Migration.php
Migration::runPoolExport in src/Controller/Migration.php

... See full list

File

src/Controller/Migration.php, line 34

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 useV2($set_runtime = null) {
  static $value = null;
  if (null !== $set_runtime) {
    $value = $set_runtime;

    // Clear cache as the Pools with now return a different Sync Core URL.
    SyncCoreFactory::clearCache();
    foreach (Pool::getAll() as $pool) {
      $pool
        ->getClient(true);
    }
  }
  if (null === $value) {
    $value = self::alwaysUseV2();
  }
  return $value;
}