3 namespace Drupal\forum\Plugin\Block;
6 * Provides an 'Active forum topics' block.
9 * id = "forum_active_block",
10 * admin_label = @Translation("Active forum topics"),
11 * category = @Translation("Lists (Views)")
14 class ActiveTopicsBlock extends ForumBlockBase {
19 protected function buildForumQuery() {
20 return db_select('forum_index', 'f')
22 ->addTag('node_access')
23 ->addMetaData('base_table', 'forum_index')
24 ->orderBy('f.last_comment_timestamp', 'DESC')
25 ->range(0, $this->configuration['block_count']);