You are here

public function PublisherTracker::nullifyHashes in Acquia Content Hub 8.2

Nullifies hashes in the Publisher Tracker.

Parameters

array $statuses: An array of status.

array $entity_types: An array of entity types.

array $uuids: An array of Entity UUIDs.

File

modules/acquia_contenthub_publisher/src/PublisherTracker.php, line 294

Class

PublisherTracker
The publisher tracker table class.

Namespace

Drupal\acquia_contenthub_publisher

Code

public function nullifyHashes(array $statuses = [], array $entity_types = [], array $uuids = []) {
  $query = $this->database
    ->update(PublisherTracker::EXPORT_TRACKING_TABLE);
  $query
    ->fields([
    'hash' => '',
  ]);
  if (!empty($statuses)) {
    $query
      ->condition('status', $statuses, 'IN');
  }
  if (!empty($entity_types)) {
    $query
      ->condition('entity_type', $entity_types, 'IN');
  }
  if (!empty($uuids)) {
    $query
      ->condition('entity_uuid', $uuids, 'IN');
  }
  $query
    ->execute();
}