public function ForumIndexStorage::update in Drupal 9
Same name and namespace in other branches
- 8 core/modules/forum/src/ForumIndexStorage.php \Drupal\forum\ForumIndexStorage::update()
Updates the {forum} table for the given node.
Parameters
\Drupal\node\NodeInterface $node: The node for which the record is to be updated.
Overrides ForumIndexStorageInterface::update
File
- core/
modules/ forum/ src/ ForumIndexStorage.php, line 83
Class
- ForumIndexStorage
- Handles CRUD operations to {forum_index} table.
Namespace
Drupal\forumCode
public function update(NodeInterface $node) {
$this->database
->update('forum')
->fields([
'tid' => $node->forum_tid,
])
->condition('vid', $node
->getRevisionId())
->execute();
}