You are here

public function NodeStorage::userRevisionIds in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/node/src/NodeStorage.php \Drupal\node\NodeStorage::userRevisionIds()

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

Parameters

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

Return value

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

Overrides NodeStorageInterface::userRevisionIds

File

core/modules/node/src/NodeStorage.php, line 30

Class

NodeStorage
Defines the storage handler class for nodes.

Namespace

Drupal\node

Code

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