You are here

public function HeartbeatStorage::revisionIds in Heartbeat 8

Gets a list of Heartbeat revision IDs for a specific Heartbeat.

Parameters

\Drupal\heartbeat\Entity\HeartbeatInterface $entity: The Heartbeat entity.

Return value

int[] Heartbeat revision IDs (in ascending order).

Overrides HeartbeatStorageInterface::revisionIds

File

src/HeartbeatStorage.php, line 23

Class

HeartbeatStorage
Defines the storage handler class for Heartbeat entities.

Namespace

Drupal\heartbeat

Code

public function revisionIds(HeartbeatInterface $entity) {
  return $this->database
    ->query('SELECT vid FROM {heartbeat_revision} WHERE id=:id ORDER BY vid', array(
    ':id' => $entity
      ->id(),
  ))
    ->fetchCol();
}