public function SubscriberTracker::listTrackedEntities in Acquia Content Hub 8.2
Obtains a list of entities.
Parameters
string $status: The status of the entities to track.
string $entity_type_id: The Entity type.
Return value
array An array of Tracked Entities set to reindex.
File
- modules/
acquia_contenthub_subscriber/ src/ SubscriberTracker.php, line 344
Class
- SubscriberTracker
- Subscriber Tracker database table methods.
Namespace
Drupal\acquia_contenthub_subscriberCode
public function listTrackedEntities(string $status, $entity_type_id = '') : array {
$query = $this->database
->select(self::IMPORT_TRACKING_TABLE, 'ci')
->fields('ci')
->condition('status', $status);
if (!empty($entity_type_id)) {
$query = $query
->condition('entity_type', $entity_type_id);
}
return $query
->execute()
->fetchAll(\PDO::FETCH_ASSOC);
}