NodeStorage::revisionIds

public NodeStorage::revisionIds(NodeInterface $node)

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

Parameters

\Drupal\node\NodeInterface $node: The node entity.

Return value

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

Overrides NodeStorageInterface::revisionIds

File

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

Class

NodeStorage
Defines the storage handler class for nodes.

Namespace

Drupal\node

Code

public function revisionIds(NodeInterface $node) {
  return $this->database->query(
  'SELECT vid FROM {node_revision} WHERE nid=:nid ORDER BY vid', 
  array(':nid' => $node->id())
  )->fetchCol();
}
doc_Drupal
2016-10-29 09:31:18
Comments
Leave a Comment

Please login to continue.