You are here

public function ForumIndexStorage::read in Drupal 9

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

Reads an array of {forum} records for the given revision ids.

Parameters

array $vids: An array of node revision ids.

Return value

\Drupal\Core\Database\StatementInterface The records from {forum} for the given vids.

Overrides ForumIndexStorageInterface::read

File

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

Class

ForumIndexStorage
Handles CRUD operations to {forum_index} table.

Namespace

Drupal\forum

Code

public function read(array $vids) {
  return $this->database
    ->select('forum', 'f')
    ->fields('f', [
    'nid',
    'tid',
  ])
    ->condition('f.vid', $vids, 'IN')
    ->execute();
}