Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
SpecialTopicSubscriptions
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 3
12
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
 execute
0.00% covered (danger)
0.00%
0 / 9
0.00% covered (danger)
0.00%
0 / 1
2
 getDescription
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace MediaWiki\Extension\DiscussionTools;
4
5use MediaWiki\Cache\LinkBatchFactory;
6use MediaWiki\Linker\LinkRenderer;
7use SpecialPage;
8
9class SpecialTopicSubscriptions extends SpecialPage {
10
11    private LinkRenderer $linkRenderer;
12    private LinkBatchFactory $linkBatchFactory;
13
14    public function __construct(
15        LinkRenderer $linkRenderer,
16        LinkBatchFactory $linkBatchFactory
17    ) {
18        parent::__construct( 'TopicSubscriptions' );
19        $this->linkRenderer = $linkRenderer;
20        $this->linkBatchFactory = $linkBatchFactory;
21    }
22
23    /**
24     * @inheritDoc
25     */
26    public function execute( $subpage ) {
27        $this->requireLogin();
28
29        parent::execute( $subpage );
30
31        $this->getOutput()->addHtml( $this->msg( 'discussiontools-topicsubscription-special-intro' )->parseAsBlock() );
32
33        $this->getOutput()->enableOOUI();
34        $pager = new TopicSubscriptionsPager(
35            $this->getContext(),
36            $this->linkRenderer,
37            $this->linkBatchFactory
38        );
39        $this->getOutput()->addParserOutputContent( $pager->getFullOutput() );
40    }
41
42    /**
43     * @inheritDoc
44     */
45    public function getDescription() {
46        return $this->msg( 'discussiontools-topicsubscription-special-title' )->text();
47    }
48
49}