You are here

private function ContentHubEntitiesTracking::getFromOriginCount in Acquia Content Hub 8

Obtains the number of entities that match a certain origin and status.

Parameters

string $origin: The origin UUID.

string $status_export: The Export Status.

string $status_import: The Import Status.

string $entity_type_id: The Entity type.

Return value

int The number of entities.

1 call to ContentHubEntitiesTracking::getFromOriginCount()
ContentHubEntitiesTracking::getCountEntitiesToReindex in src/ContentHubEntitiesTracking.php
Obtains the number of exported entities marked for Reindex.

File

src/ContentHubEntitiesTracking.php, line 844

Class

ContentHubEntitiesTracking
Tracks in a table the list of all entities imported from Content Hub.

Namespace

Drupal\acquia_contenthub

Code

private function getFromOriginCount($origin, $status_export = '', $status_import = '', $entity_type_id = '') {
  if ($query = $this
    ->getFromOriginQuery($origin, $status_export, $status_import, $entity_type_id)) {
    return $query
      ->countQuery()
      ->execute()
      ->fetchField();
  }
  return 0;
}