You are here

public function HeartbeatStreamStorage::userRevisionIds in Heartbeat 8

Gets a list of revision IDs having a given user as Heartbeat stream author.

Parameters

\Drupal\Core\Session\AccountInterface $account: The user entity.

Return value

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

Overrides HeartbeatStreamStorageInterface::userRevisionIds

File

src/HeartbeatStreamStorage.php, line 33

Class

HeartbeatStreamStorage
Defines the storage handler class for Heartbeat stream entities.

Namespace

Drupal\heartbeat

Code

public function userRevisionIds(AccountInterface $account) {
  return $this->database
    ->query('SELECT vid FROM {heartbeat_stream_field_revision} WHERE uid = :uid ORDER BY vid', array(
    ':uid' => $account
      ->id(),
  ))
    ->fetchCol();
}