You are here

public static function SyncCoreFactory::getSyncCoreV2 in CMS Content Sync 2.1.x

Same name and namespace in other branches
  1. 2.0.x src/SyncCoreInterface/SyncCoreFactory.php \Drupal\cms_content_sync\SyncCoreInterface\SyncCoreFactory::getSyncCoreV2()

Parameters

mixed $based_on_current_setting:

Return value

\EdgeBox\SyncCore\V2\SyncCore

8 calls to SyncCoreFactory::getSyncCoreV2()
CopyRemoteFlow::flowListForm in src/Form/CopyRemoteFlow.php
Step 3: Select the remote Flow to import now.
CopyRemoteFlow::getFlowConfig in src/Form/CopyRemoteFlow.php
Get a remote Flow config from the Sync Core.
CopyRemoteFlow::getRemotePools in src/Form/CopyRemoteFlow.php
List all remote pools that aren't used locally yet.
Pool::getClient in src/Entity/Pool.php
SyncCoreEntityItemResource::handleIncomingEntity in src/Plugin/rest/resource/SyncCoreEntityItemResource.php

... See full list

File

src/SyncCoreInterface/SyncCoreFactory.php, line 61

Class

SyncCoreFactory
Class SyncCoreFactory.

Namespace

Drupal\cms_content_sync\SyncCoreInterface

Code

public static function getSyncCoreV2($based_on_current_setting = false) {
  if ($based_on_current_setting) {
    $url = DrupalApplication::get()
      ->getSyncCoreUrl();
    if ($url) {
      return new \EdgeBox\SyncCore\V2\SyncCore(DrupalApplication::get(), $url);
    }
  }
  if (!empty(self::$v2)) {
    return self::$v2;
  }
  return self::$v2 = new \EdgeBox\SyncCore\V2\SyncCore(DrupalApplication::get(), self::getSyncCoreV2Url());
}