76 parent::__construct(
'AutoblockList' );
78 $this->linkBatchFactory = $linkBatchFactory;
79 $this->blockRestrictionStore = $blockRestrictionStore;
80 $this->dbProvider = $dbProvider;
81 $this->commentStore = $commentStore;
82 $this->blockUtils = $blockUtils;
83 $this->hideUserUtils = $hideUserUtils;
84 $this->blockActionInfo = $blockActionInfo;
85 $this->rowCommentFormatter = $rowCommentFormatter;
95 $out->setPageTitleMsg( $this->
msg(
'autoblocklist' ) );
97 $out->addModuleStyles( [
'mediawiki.special' ] );
99 # setup BlockListPager here to get the actual default Limit
102 # Just show the block list
105 'type' =>
'limitselect',
106 'label-message' =>
'table_pager_limit_label',
107 'options' => $pager->getLimitSelectList(),
109 'default' => $pager->getLimit(),
113 $form = HTMLForm::factory(
'ooui', $fields, $this->
getContext() );
114 $form->setMethod(
'get' )
116 ->setFormIdentifier(
'blocklist' )
117 ->setWrapperLegendMsg(
'autoblocklist-legend' )
118 ->setSubmitTextMsg(
'autoblocklist-submit' )
120 ->displayForm(
false );
131 'bl_parent_block_id IS NOT NULL',
133 # Is the user allowed to see hidden blocks?
134 if ( !$this->
getAuthority()->isAllowed(
'hideuser' ) ) {
135 $conds[
'bl_deleted'] = 0;
140 $this->blockActionInfo,
141 $this->blockRestrictionStore,
143 $this->hideUserUtils,
145 $this->linkBatchFactory,
148 $this->rowCommentFormatter,
161 # Check for other blocks, i.e. global/tor blocks
162 $otherAutoblockLink = [];
163 $this->
getHookRunner()->onOtherAutoblockLogLink( $otherAutoblockLink );
165 # Show additional header for the local block only when other blocks exists.
166 # Not necessary in a standard installation without such extensions enabled
167 if ( count( $otherAutoblockLink ) ) {
169 Html::rawElement(
'h2', [], $this->
msg(
'autoblocklist-localblocks',
178 $out->addWikiMsg(
'autoblocklist-empty' );
181 if ( count( $otherAutoblockLink ) ) {
186 $this->
msg(
'autoblocklist-otherblocks', count( $otherAutoblockLink ) )->parse()
190 foreach ( $otherAutoblockLink as $link ) {
191 $list .= Html::rawElement(
'li', [], $link ) .
"\n";
196 [
'class' =>
'mw-autoblocklist-otherblocks' ],
209class_alias( SpecialAutoblockList::class,
'SpecialAutoblockList' );
Parent class for all special pages.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getPageTitle( $subpage=false)
Get a self-referential title object.
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
getAuthority()
Shortcut to get the Authority executing this instance.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages By default the message key is the canonical name of...
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.