mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-14 11:25:10 +00:00
a0dc12ab56
Bug: T273342 Change-Id: If96a0df1efbf5cadfb6bf2bf8f7ad5c9c90ea142
57 lines
1.2 KiB
PHP
57 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools;
|
|
|
|
use MediaWiki\Cache\LinkBatchFactory;
|
|
use MediaWiki\Linker\LinkRenderer;
|
|
use SpecialPage;
|
|
|
|
class SpecialTopicSubscriptions extends SpecialPage {
|
|
|
|
/** @var LinkRenderer */
|
|
private $linkRenderer;
|
|
|
|
/** @var LinkBatchFactory */
|
|
private $linkBatchFactory;
|
|
|
|
/**
|
|
* @param LinkRenderer $linkRenderer
|
|
* @param LinkBatchFactory $linkBatchFactory
|
|
*/
|
|
public function __construct(
|
|
LinkRenderer $linkRenderer,
|
|
LinkBatchFactory $linkBatchFactory
|
|
) {
|
|
parent::__construct( 'TopicSubscriptions' );
|
|
$this->linkRenderer = $linkRenderer;
|
|
$this->linkBatchFactory = $linkBatchFactory;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function execute( $subpage ) {
|
|
$this->requireLogin();
|
|
|
|
parent::execute( $subpage );
|
|
|
|
$this->getOutput()->addHtml( $this->msg( 'discussiontools-topicsubscription-special-intro' )->parseAsBlock() );
|
|
|
|
$this->getOutput()->enableOOUI();
|
|
$pager = new TopicSubscriptionsPager(
|
|
$this->getContext(),
|
|
$this->linkRenderer,
|
|
$this->linkBatchFactory
|
|
);
|
|
$this->getOutput()->addParserOutputContent( $pager->getFullOutput() );
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function getDescription() {
|
|
return $this->msg( 'discussiontools-topicsubscription-special-title' )->text();
|
|
}
|
|
|
|
}
|