protected function NewTopicsBlock::buildForumQuery in Drupal 10
Same name and namespace in other branches
- 8 core/modules/forum/src/Plugin/Block/NewTopicsBlock.php \Drupal\forum\Plugin\Block\NewTopicsBlock::buildForumQuery()
- 9 core/modules/forum/src/Plugin/Block/NewTopicsBlock.php \Drupal\forum\Plugin\Block\NewTopicsBlock::buildForumQuery()
File
- core/
modules/ forum/ src/ Plugin/ Block/ NewTopicsBlock.php, line 21
Class
- NewTopicsBlock
- Provides a 'New forum topics' block.
Namespace
Drupal\forum\Plugin\BlockCode
protected function buildForumQuery() {
return Database::getConnection()
->select('forum_index', 'f')
->fields('f')
->addTag('node_access')
->addMetaData('base_table', 'forum_index')
->orderBy('f.created', 'DESC')
->range(0, $this->configuration['block_count']);
}