You are here

public function NodeStorage::userRevisionIds in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 35
Contains \Drupal\node\NodeStorage.

Class

NodeStorage
Defines the controller class for nodes.

Namespace

Drupal\node

Code

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