function NodeStorage::revisionIds
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\nodeCode
public function revisionIds(NodeInterface $node) {
@trigger_error(__CLASS__ . "::" . __FUNCTION__ . " is deprecated in drupal:11.3.0 and is removed from drupal:13.0.0. Use an entity query instead. See https://www.drupal.org/node/3519187", E_USER_DEPRECATED);
return $this->database
->query('SELECT [vid] FROM {' . $this->getRevisionTable() . '} WHERE [nid] = :nid ORDER BY [vid]', [
':nid' => $node->id(),
])
->fetchCol();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.