function ActiveTopicsBlock::buildForumQuery
Same name in other branches
- 8.9.x core/modules/forum/src/Plugin/Block/ActiveTopicsBlock.php \Drupal\forum\Plugin\Block\ActiveTopicsBlock::buildForumQuery()
- 10 core/modules/forum/src/Plugin/Block/ActiveTopicsBlock.php \Drupal\forum\Plugin\Block\ActiveTopicsBlock::buildForumQuery()
- 11.x core/modules/forum/src/Plugin/Block/ActiveTopicsBlock.php \Drupal\forum\Plugin\Block\ActiveTopicsBlock::buildForumQuery()
Overrides ForumBlockBase::buildForumQuery
File
-
core/
modules/ forum/ src/ Plugin/ Block/ ActiveTopicsBlock.php, line 21
Class
- ActiveTopicsBlock
- Provides an 'Active 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.last_comment_timestamp', 'DESC')
->range(0, $this->configuration['block_count']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.