You are here

public function ContentHubEntitiesTracking::loadExportedByDrupalEntity in Acquia Content Hub 8

Loads an Exported Entity tracking record by entity key information.

Parameters

string $entity_type: The Entity type.

string $entity_id: The entity ID.

Return value

\Drupal\acquia_contenthub\ContentHubEntitiesTracking|bool The ContentHubEntitiesTracking object if it exists and is exported, FALSE otherwise.

File

src/ContentHubEntitiesTracking.php, line 624

Class

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

Namespace

Drupal\acquia_contenthub

Code

public function loadExportedByDrupalEntity($entity_type, $entity_id) {
  if ($exported_entity = $this
    ->loadByDrupalEntity($entity_type, $entity_id)) {
    return $exported_entity
      ->isExportedEntity();
  }
  return FALSE;
}