You are here

public function SyncHealth::pushing 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::pushing()
  2. 2.0.x modules/cms_content_sync_health/src/Controller/SyncHealth.php \Drupal\cms_content_sync_health\Controller\SyncHealth::pushing()

Render the overview page.

Return value

array

1 string reference to 'SyncHealth::pushing'
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 491

Class

SyncHealth
Provides a listing of Flow.

Namespace

Drupal\cms_content_sync_health\Controller

Code

public function pushing() {
  $push_failures_hard = $this
    ->countStatusEntitiesWithFlag(EntityStatus::FLAG_PUSH_FAILED, [
    'request_failed' => PushIntent::PUSH_FAILED_REQUEST_FAILED,
    'invalid_status_code' => PushIntent::PUSH_FAILED_REQUEST_INVALID_STATUS_CODE,
    'dependency_push_failed' => PushIntent::PUSH_FAILED_DEPENDENCY_PUSH_FAILED,
    'internal_error' => PushIntent::PUSH_FAILED_INTERNAL_ERROR,
  ]);
  $push_failures_soft = $this
    ->countStatusEntitiesWithFlag(EntityStatus::FLAG_PUSH_FAILED_SOFT, [
    'handler_denied' => PushIntent::PUSH_FAILED_HANDLER_DENIED,
    'unchanged' => PushIntent::PUSH_FAILED_UNCHANGED,
  ]);
  $pending = [
    'stale_entities' => $this
      ->countStaleEntities(),
    'version_changed' => $this
      ->countEntitiesWithChangedVersionForPush(),
    'manual_push' => $this
      ->countEntitiesWaitingForPush(),
  ];
  return [
    '#theme' => 'cms_content_sync_sync_health_push',
    '#push_failures_hard' => $push_failures_hard,
    '#push_failures_soft' => $push_failures_soft,
    '#pending' => $pending,
  ];
}