public function ForumIndexStorage::update in Drupal 8
Same name and namespace in other branches
- 9 core/modules/forum/src/ForumIndexStorage.php \Drupal\forum\ForumIndexStorage::update()
- 10 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();
}