Go to the documentation of this file.
34 parent::__construct(
'Protectedpages' );
40 $this->
getOutput()->addModuleStyles(
'mediawiki.special' );
44 $level =
$request->getVal( $this->IdLevel );
45 $sizetype =
$request->getVal(
'sizetype' );
46 $size =
$request->getIntOrNull(
'size' );
47 $ns =
$request->getIntOrNull(
'namespace' );
48 $indefOnly =
$request->getBool(
'indefonly' ) ? 1 : 0;
49 $cascadeOnly =
$request->getBool(
'cascadeonly' ) ? 1 : 0;
50 $noRedirect =
$request->getBool(
'noredirect' ) ? 1 : 0;
77 if ( $pager->getNumRows() ) {
78 $this->
getOutput()->addParserOutputContent( $pager->getFullOutput() );
80 $this->
getOutput()->addWikiMsg(
'protectedpagesempty' );
96 $size, $indefOnly, $cascadeOnly, $noRedirect
129 'selected' => $namespace,
131 'label' => $this->
msg(
'namespace' )->
text()
133 'name' =>
'namespace',
135 'class' =>
'namespaceselector',
147 $this->
msg(
'protectedpages-indef' )->
text(),
160 $this->
msg(
'protectedpages-cascade' )->
text(),
173 $this->
msg(
'protectedpages-noredirect' )->
text(),
186 $max = $sizetype ===
'max';
189 $this->
msg(
'minimum-size' )->
text(),
197 $this->
msg(
'maximum-size' )->
text(),
204 Xml::input(
'size', 9, $size, [
'id' =>
'wpsize' ] ) .
221 $text = $this->
msg(
"restriction-$type" )->text();
226 foreach ( $m
as $text =>
$type ) {
227 $selected = (
$type == $pr_type );
231 return '<span class="mw-input-with-label">' .
234 [
'id' => $this->IdType,
'name' => $this->IdType ],
235 implode(
"\n",
$options ) ) .
"</span>";
245 $m = [ $this->
msg(
'restriction-level-all' )->text() => 0 ];
251 if ( $type !=
'' &&
$type !=
'*' ) {
252 $text = $this->
msg(
"restriction-level-$type" )->text();
258 foreach ( $m
as $text =>
$type ) {
259 $selected = (
$type == $pr_level );
263 return '<span class="mw-input-with-label">' .
266 [
'id' => $this->IdLevel,
'name' => $this->IdLevel ],
267 implode(
"\n",
$options ) ) .
"</span>";
271 return 'maintenance';
getPageTitle( $subpage=false)
Get a self-referential title object.
execute( $par)
Default execute method Checks user permissions.
error also a ContextSource you ll probably need to make sure the header is varied on $request
static getFilteredRestrictionTypes( $exists=true)
Get a filtered list of all restriction types supported by this wiki.
static tags( $element, $attribs=null, $contents)
Same as Xml::element(), but does not escape contents.
getOutput()
Get the OutputPage being used for this instance.
static label( $label, $id, $attribs=[])
Convenience function to build an HTML form label.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
static option( $text, $value=null, $selected=false, $attribs=[])
Convenience function to build an HTML drop-down list item.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values before the output is cached my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled allows for interception of redirect as a string mapping parameter names to values & $type
getSizeLimit( $sizetype, $size)
static openElement( $element, $attribs=null)
This opens an XML element.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
getRedirectCheck( $noRedirect)
getConfig()
Shortcut to get main config object.
namespace and then decline to actually register it file or subcat img or subcat $title
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
A special page that lists protected pages.
static element( $element, $attribs=null, $contents='', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
showOptions( $namespace, $type='edit', $level, $sizetype, $size, $indefOnly, $cascadeOnly, $noRedirect)
getLevelMenu( $pr_level)
Creates the input label of the restriction level.
getTypeMenu( $pr_type)
Creates the input label of the restriction type.
static hidden( $name, $value, array $attribs=[])
Convenience function to produce an input element with type=hidden.
msg()
Wrapper around wfMessage that sets the current context.
static namespaceSelector(array $params=[], array $selectAttribs=[])
Build a drop-down box for selecting a namespace.
Parent class for all special pages.
getNamespaceMenu( $namespace=null)
Prepare the namespace filter drop-down; standard namespace selector, sans the MediaWiki namespace.
getRequest()
Get the WebRequest being used for this instance.
static radioLabel( $label, $name, $value, $id, $checked=false, $attribs=[])
Convenience function to build an HTML radio button with a label.
static closeElement( $element)
Shortcut to close an XML element.
getCascadeCheck( $cascadeOnly)
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
static input( $name, $size=false, $value=false, $attribs=[])
Convenience function to build an HTML text input field.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist and Watchlist you will want to construct new ChangesListBooleanFilter or ChangesListStringOptionsFilter objects When constructing you specify which group they belong to You can reuse existing or create your you must register them with $special registerFilterGroup removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context $options
getExpiryCheck( $indefOnly)
static submitButton( $value, $attribs=[])
Convenience function to build an HTML submit button When $wgUseMediaWikiUIEverywhere is true it will ...
static checkLabel( $label, $name, $id, $checked=false, $attribs=[])
Convenience function to build an HTML checkbox with a label.