You are here

public function ForumIndexStorage::update in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/forum/src/ForumIndexStorage.php \Drupal\forum\ForumIndexStorage::update()
  2. 9 core/modules/forum/src/ForumIndexStorage.php \Drupal\forum\ForumIndexStorage::update()

File

core/modules/forum/src/ForumIndexStorage.php, line 83

Class

ForumIndexStorage
Handles CRUD operations to {forum_index} table.

Namespace

Drupal\forum

Code

public function update(NodeInterface $node) {
  $this->database
    ->update('forum')
    ->fields([
    'tid' => $node->forum_tid,
  ])
    ->condition('vid', $node
    ->getRevisionId())
    ->execute();
}