27 parent::__construct(
'Listgrants' );
28 $this->grantsLocalization = $grantsLocalization;
40 $out->addModuleStyles(
'mediawiki.special' );
43 Html::openElement(
'table', [
'class' => [
'wikitable',
'mw-listgrouprights-table' ] ] ) .
56 $rights = array_filter( $rights );
57 foreach ( $rights as $permission => $granted ) {
58 $descs[] = $this->
msg(
'listgrouprights-right-display' )
59 ->params( User::getRightDescription( $permission ) )
62 [
'class' =>
'mw-listgrants-right-name' ],
67 if ( $descs === [] ) {
71 $grantCellHtml =
'<ul><li>' . implode(
"</li>\n<li>", $descs ) .
'</li></ul>';
74 $out->addHTML( Html::rawElement(
'tr', [
'id' => $grant ],
76 $this->
msg(
'listgrants-grant-display' )
77 ->params( $this->grantsLocalization->getGrantDescription( $grant, $lang ) )
80 [
'class' =>
'mw-listgrants-grant-name' ],
85 "<td>" . $grantCellHtml .
"</td>"
89 $out->addHTML( Html::closeElement(
'table' ) );
99class_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...