NodeStorage::userRevisionIds

public NodeStorage::userRevisionIds(AccountInterface $account)

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 {node_field_revision} WHERE uid = :uid ORDER BY vid', 
  array(':uid' => $account->id())
  )->fetchCol();
}
doc_Drupal
2016-10-29 09:31:19
Comments
Leave a Comment

Please login to continue.