38 parent::__construct(
'Listgrants' );
51 $out->addModuleStyles(
'mediawiki.special' );
55 [
'class' =>
'wikitable mw-listgrouprights-table' ] ) .
65 $this->
getConfig()->
get( MainConfigNames::GrantPermissions ) as $grant => $rights
68 $rights = array_filter( $rights );
69 foreach ( $rights as $permission => $granted ) {
70 $descs[] = $this->
msg(
71 'listgrouprights-right-display',
73 '<span class="mw-listgrants-right-name">' . $permission .
'</span>'
76 if ( $descs === [] ) {
80 $grantCellHtml =
'<ul><li>' . implode(
"</li>\n<li>", $descs ) .
'</li></ul>';
87 "listgrants-grant-display",
88 $this->grantsLocalization->getGrantDescription( $grant,
$lang ),
89 "<span class='mw-listgrants-grant-name'>" . $id .
"</span>"
92 "<td>" . $grantCellHtml .
"</td>"
static element( $element, $attribs=[], $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
static openElement( $element, $attribs=[])
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
static closeElement( $element)
Returns "</$element>".
A class containing constants representing the names of configuration variables.
static escapeIdForAttribute( $id, $mode=self::ID_PRIMARY)
Given a section name or other user-generated or otherwise unsafe string, escapes it to be a valid HTM...
This special page lists all defined rights grants and the associated rights.
GrantsLocalization $grantsLocalization
__construct(GrantsLocalization $grantsLocalization)
execute( $par)
Show the special page.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Parent class for all special pages.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getOutput()
Get the OutputPage being used for this instance.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getConfig()
Shortcut to get main config object.
getLanguage()
Shortcut to get user's language.
static getRightDescription( $right)
Get the description of a given right.
if(!isset( $args[0])) $lang