You are here

public function ForumIndexStorage::deleteIndex in Drupal 8

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

Deletes the {forum_index} records for a given node.

Parameters

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

Overrides ForumIndexStorageInterface::deleteIndex

File

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

Class

ForumIndexStorage
Handles CRUD operations to {forum_index} table.

Namespace

Drupal\forum

Code

public function deleteIndex(NodeInterface $node) {
  $this->database
    ->delete('forum_index')
    ->condition('nid', $node
    ->id())
    ->execute();
}