41 parent::__construct(
'Listgrants' );
42 $this->grantsLocalization = $grantsLocalization;
54 $out->addModuleStyles(
'mediawiki.special' );
57 Html::openElement(
'table', [
'class' =>
'wikitable mw-listgrouprights-table' ] ) .
70 $rights = array_filter( $rights );
71 foreach ( $rights as $permission => $granted ) {
72 $descs[] = $this->
msg(
'listgrouprights-right-display' )
73 ->params( User::getRightDescription( $permission ) )
76 [
'class' =>
'mw-listgrants-right-name' ],
81 if ( $descs === [] ) {
85 $grantCellHtml =
'<ul><li>' . implode(
"</li>\n<li>", $descs ) .
'</li></ul>';
88 $out->addHTML( Html::rawElement(
'tr', [
'id' => $grant ],
90 $this->
msg(
'listgrants-grant-display' )
91 ->params( $this->grantsLocalization->getGrantDescription( $grant, $lang ) )
94 [
'class' =>
'mw-listgrants-grant-name' ],
99 "<td>" . $grantCellHtml .
"</td>"
103 $out->addHTML( Html::closeElement(
'table' ) );
112class_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()
Parent class for all special pages.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getConfig()
Shortcut to get main config object.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
getLanguage()
Shortcut to get user's language.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages By default the message key is the canonical name of...