You are here

public static function SyncCoreFactory::getAllSyncCores in CMS Content Sync 8

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

Return value

\EdgeBox\SyncCore\Interfaces\ISyncCore[]

7 calls to SyncCoreFactory::getAllSyncCores()
CliService::sync_core_login in src/Cli/CliService.php
Kindly ask the Sync Core to login again.
cms_content_sync_requirements in ./cms_content_sync.install
Implements hook_requirements.
cms_content_sync_update_8010 in ./cms_content_sync.install
Promote Site ID + Authentication type as a side-wide property rather than a setting per pool.
ContentSyncSettings::setSiteName in src/Controller/ContentSyncSettings.php
DebugForm::submitForm in src/Form/DebugForm.php
Form submission handler.

... See full list

File

src/SyncCoreInterface/SyncCoreFactory.php, line 47

Class

SyncCoreFactory
Class SyncCoreFactory.

Namespace

Drupal\cms_content_sync\SyncCoreInterface

Code

public static function getAllSyncCores() {
  if (!empty(self::$allSyncCores)) {
    return self::$allSyncCores;
  }
  $cores = [];
  foreach (Pool::getAll() as $pool) {
    $url = parse_url($pool
      ->getSyncCoreUrl());
    $host = $url['host'];
    if (isset($cores[$host])) {
      continue;
    }
    $cores[$host] = self::getSyncCore($pool
      ->getSyncCoreUrl());
  }
  return self::$allSyncCores = $cores;
}