function NodeStorage::countDefaultLanguageRevisions
Same name in other branches
- 9 core/modules/node/src/NodeStorage.php \Drupal\node\NodeStorage::countDefaultLanguageRevisions()
- 10 core/modules/node/src/NodeStorage.php \Drupal\node\NodeStorage::countDefaultLanguageRevisions()
- 11.x core/modules/node/src/NodeStorage.php \Drupal\node\NodeStorage::countDefaultLanguageRevisions()
Overrides NodeStorageInterface::countDefaultLanguageRevisions
File
-
core/
modules/ node/ src/ NodeStorage.php, line 40
Class
- NodeStorage
- Defines the storage handler class for nodes.
Namespace
Drupal\nodeCode
public function countDefaultLanguageRevisions(NodeInterface $node) {
return $this->database
->query('SELECT COUNT(*) FROM {' . $this->getRevisionDataTable() . '} WHERE nid = :nid AND default_langcode = 1', [
':nid' => $node->id(),
])
->fetchField();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.