MediaWiki REL1_39
MWGrants.php
Go to the documentation of this file.
1<?php
22
29class MWGrants {
30
37 public static function getValidGrants() {
38 wfDeprecated( __METHOD__, '1.38' );
39 return MediaWikiServices::getInstance()->getGrantsInfo()->getValidGrants();
40 }
41
48 public static function getRightsByGrant() {
49 wfDeprecated( __METHOD__, '1.38' );
50 return MediaWikiServices::getInstance()->getGrantsInfo()->getRightsByGrant();
51 }
52
61 public static function grantName( $grant, $lang = null ) {
62 wfDeprecated( __METHOD__, '1.38' );
63 return MediaWikiServices::getInstance()->getGrantsLocalization()->getGrantDescription( $grant, $lang );
64 }
65
74 public static function grantNames( array $grants, $lang = null ) {
75 wfDeprecated( __METHOD__, '1.38' );
76 return MediaWikiServices::getInstance()->getGrantsLocalization()->getGrantDescriptions( $grants, $lang );
77 }
78
86 public static function getGrantRights( $grants ) {
87 wfDeprecated( __METHOD__, '1.38' );
88 return MediaWikiServices::getInstance()->getGrantsInfo()->getGrantRights( $grants );
89 }
90
98 public static function grantsAreValid( array $grants ) {
99 wfDeprecated( __METHOD__, '1.38' );
100 return MediaWikiServices::getInstance()->getGrantsInfo()->grantsAreValid( $grants );
101 }
102
110 public static function getGrantGroups( $grantsFilter = null ) {
111 wfDeprecated( __METHOD__, '1.38' );
112 return MediaWikiServices::getInstance()->getGrantsInfo()->getGrantGroups( $grantsFilter );
113 }
114
121 public static function getHiddenGrants() {
122 wfDeprecated( __METHOD__, '1.38' );
123 return MediaWikiServices::getInstance()->getGrantsInfo()->getHiddenGrants();
124 }
125
139 public static function getGrantsLink( $grant, $lang = null ) {
140 wfDeprecated( __METHOD__, '1.38' );
141 return MediaWikiServices::getInstance()->getGrantsLocalization()->getGrantsLink( $grant, $lang );
142 }
143
153 public static function getGrantsWikiText( $grantsFilter, $lang = null ) {
154 wfDeprecated( __METHOD__, '1.38' );
155 return MediaWikiServices::getInstance()->getGrantsLocalization()->getGrantsWikiText( $grantsFilter, $lang );
156 }
157
158}
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
static getGrantsWikiText( $grantsFilter, $lang=null)
Generate wikitext to display a list of grants.
Definition MWGrants.php:153
static grantName( $grant, $lang=null)
Fetch the description of the grant.
Definition MWGrants.php:61
static getHiddenGrants()
Get the list of grants that are hidden and should always be granted.
Definition MWGrants.php:121
static grantNames(array $grants, $lang=null)
Fetch the descriptions for the grants.
Definition MWGrants.php:74
static getGrantsLink( $grant, $lang=null)
Generate a link to Special:ListGrants for a particular grant name.
Definition MWGrants.php:139
static getRightsByGrant()
Map all grants to corresponding user rights.
Definition MWGrants.php:48
static grantsAreValid(array $grants)
Test that all grants in the list are known.
Definition MWGrants.php:98
static getGrantRights( $grants)
Fetch the rights allowed by a set of grants.
Definition MWGrants.php:86
static getGrantGroups( $grantsFilter=null)
Divide the grants into groups.
Definition MWGrants.php:110
static getValidGrants()
List all known grants.
Definition MWGrants.php:37
Service locator for MediaWiki core services.
if(!isset( $args[0])) $lang