24 namespace MediaWiki\Specials;
39 private $grantsLocalization;
42 parent::__construct(
'Listgrants' );
43 $this->grantsLocalization = $grantsLocalization;
55 $out->addModuleStyles(
'mediawiki.special' );
59 [
'class' =>
'wikitable mw-listgrouprights-table' ] ) .
72 $rights = array_filter( $rights );
73 foreach ( $rights as $permission => $granted ) {
74 $descs[] = $this->
msg(
75 'listgrouprights-right-display',
77 '<span class="mw-listgrants-right-name">' . $permission .
'</span>'
80 if ( $descs === [] ) {
84 $grantCellHtml =
'<ul><li>' . implode(
"</li>\n<li>", $descs ) .
'</li></ul>';
91 "listgrants-grant-display",
92 $this->grantsLocalization->getGrantDescription( $grant,
$lang ),
93 "<span class='mw-listgrants-grant-name'>" . $id .
"</span>"
96 "<td>" . $grantCellHtml .
"</td>"
111 class_alias( SpecialListGrants::class,
'SpecialListGrants' );
A class containing constants representing the names of configuration variables.
const GrantPermissions
Name constant for the GrantPermissions setting, for use with Config::get()
HTML sanitizer for MediaWiki.
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...
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