function NodeStorage::revisionIds

Same name in other branches
  1. 8.9.x core/modules/node/src/NodeStorage.php \Drupal\node\NodeStorage::revisionIds()
  2. 10 core/modules/node/src/NodeStorage.php \Drupal\node\NodeStorage::revisionIds()
  3. 11.x core/modules/node/src/NodeStorage.php \Drupal\node\NodeStorage::revisionIds()

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 {' . $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.