public function ForumIndexStorage::getOriginalTermId in Drupal 10
Same name and namespace in other branches
- 8 core/modules/forum/src/ForumIndexStorage.php \Drupal\forum\ForumIndexStorage::getOriginalTermId()
- 9 core/modules/forum/src/ForumIndexStorage.php \Drupal\forum\ForumIndexStorage::getOriginalTermId()
File
- core/
modules/ forum/ src/ ForumIndexStorage.php, line 34
Class
- ForumIndexStorage
- Handles CRUD operations to {forum_index} table.
Namespace
Drupal\forumCode
public function getOriginalTermId(NodeInterface $node) {
return $this->database
->queryRange("SELECT [f].[tid] FROM {forum} [f] INNER JOIN {node} [n] ON [f].[vid] = [n].[vid] WHERE [n].[nid] = :nid ORDER BY [f].[vid] DESC", 0, 1, [
':nid' => $node
->id(),
])
->fetchField();
}