You are here

public function SyncHealth::pulling in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x modules/cms_content_sync_health/src/Controller/SyncHealth.php \Drupal\cms_content_sync_health\Controller\SyncHealth::pulling()
  2. 2.0.x modules/cms_content_sync_health/src/Controller/SyncHealth.php \Drupal\cms_content_sync_health\Controller\SyncHealth::pulling()

Render the overview page.

Return value

array

1 string reference to 'SyncHealth::pulling'
cms_content_sync_health.routing.yml in modules/cms_content_sync_health/cms_content_sync_health.routing.yml
modules/cms_content_sync_health/cms_content_sync_health.routing.yml

File

modules/cms_content_sync_health/src/Controller/SyncHealth.php, line 523

Class

SyncHealth
Provides a listing of Flow.

Namespace

Drupal\cms_content_sync_health\Controller

Code

public function pulling() {
  $pull_failures_hard = $this
    ->countStatusEntitiesWithFlag(EntityStatus::FLAG_PULL_FAILED, [
    'different_version' => PullIntent::PULL_FAILED_DIFFERENT_VERSION,
    'sync_error' => PullIntent::PULL_FAILED_CONTENT_SYNC_ERROR,
    'internal_error' => PullIntent::PULL_FAILED_INTERNAL_ERROR,
  ]);
  $pull_failures_soft = $this
    ->countStatusEntitiesWithFlag(EntityStatus::FLAG_PULL_FAILED_SOFT, [
    'handler_denied' => PullIntent::PULL_FAILED_HANDLER_DENIED,
    'no_flow' => PullIntent::PULL_FAILED_NO_FLOW,
    'unknown_pool' => PullIntent::PULL_FAILED_UNKNOWN_POOL,
  ]);
  return [
    '#theme' => 'cms_content_sync_sync_health_pull',
    '#pull_failures_hard' => $pull_failures_hard,
    '#pull_failures_soft' => $pull_failures_soft,
  ];
}