You are here

public function ForumIndexStorage::update in Zircon Profile 8.0

Same name and namespace in other branches
  1. 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 87
Contains \Drupal\forum\ForumIndexStorage.

Class

ForumIndexStorage
Handles CRUD operations to {forum_index} table.

Namespace

Drupal\forum

Code

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