You are here

public function ContentHubEntitiesTracking::loadImportedByDrupalEntity in Acquia Content Hub 8

Loads an Imported 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 imported, FALSE otherwise.

File

src/ContentHubEntitiesTracking.php, line 643

Class

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

Namespace

Drupal\acquia_contenthub

Code

public function loadImportedByDrupalEntity($entity_type, $entity_id) {
  if ($imported_entity = $this
    ->loadByDrupalEntity($entity_type, $entity_id)) {
    return $imported_entity
      ->isImportedEntity();
  }
  return FALSE;
}