42 parent::__construct(
'Listgrants' );
43 $this->grantsLocalization = $grantsLocalization;
55 $out->addModuleStyles(
'mediawiki.special' );
58 Html::openElement(
'table', [
'class' =>
'wikitable mw-listgrouprights-table' ] ) .
71 $rights = array_filter( $rights );
72 foreach ( $rights as $permission => $granted ) {
73 $descs[] = $this->
msg(
'listgrouprights-right-display' )
74 ->params( User::getRightDescription( $permission ) )
77 [
'class' =>
'mw-listgrants-right-name' ],
82 if ( $descs === [] ) {
86 $grantCellHtml =
'<ul><li>' . implode(
"</li>\n<li>", $descs ) .
'</li></ul>';
89 $out->addHTML( Html::rawElement(
'tr', [
'id' => $grant ],
91 $this->
msg(
'listgrants-grant-display' )
92 ->params( $this->grantsLocalization->getGrantDescription( $grant, $lang ) )
95 [
'class' =>
'mw-listgrants-grant-name' ],
100 "<td>" . $grantCellHtml .
"</td>"
104 $out->addHTML( Html::closeElement(
'table' ) );
113class_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 Per default the message key is the canonical name o...