You are here

public function ForumIndexStorage::deleteRevision in Zircon Profile 8.0

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

Deletes the records in {forum} table for a given node revision.

Parameters

\Drupal\node\NodeInterface $node: The node revision for which the records are to be deleted.

Overrides ForumIndexStorageInterface::deleteRevision

File

core/modules/forum/src/ForumIndexStorage.php, line 77
Contains \Drupal\forum\ForumIndexStorage.

Class

ForumIndexStorage
Handles CRUD operations to {forum_index} table.

Namespace

Drupal\forum

Code

public function deleteRevision(NodeInterface $node) {
  $this->database
    ->delete('forum')
    ->condition('nid', $node
    ->id())
    ->condition('vid', $node
    ->getRevisionId())
    ->execute();
}