MediaWiki REL1_40
|
This separate service is needed because the ::getGrantsLink method requires a LinkRenderer and if we tried to inject a LinkRenderer into the GrantsInfo service, it would result in recursive service instantiation for sessions using the BotPasswordSessionProvider, as a result of injecting the LinkRenderer when trying to use a GrantsInfo method that doesn't even need it. More...
Public Member Functions | |
__construct (GrantsInfo $grantsInfo, LinkRenderer $linkRenderer, LanguageFactory $languageFactory, Language $contentLanguage) | |
getGrantDescription (string $grant, $lang=null) | |
Fetch the description of the grant. | |
getGrantDescriptions (array $grants, $lang=null) | |
Fetch the descriptions for the grants. | |
getGrantsLink (string $grant, $lang=null) | |
Generate a link to Special:ListGrants for a particular grant name. | |
getGrantsWikiText ( $grantsFilter, $lang=null) | |
Generate wikitext to display a list of grants. | |
This separate service is needed because the ::getGrantsLink method requires a LinkRenderer and if we tried to inject a LinkRenderer into the GrantsInfo service, it would result in recursive service instantiation for sessions using the BotPasswordSessionProvider, as a result of injecting the LinkRenderer when trying to use a GrantsInfo method that doesn't even need it.
Definition at line 37 of file GrantsLocalization.php.
MediaWiki\Permissions\GrantsLocalization::__construct | ( | GrantsInfo | $grantsInfo, |
LinkRenderer | $linkRenderer, | ||
LanguageFactory | $languageFactory, | ||
Language | $contentLanguage ) |
GrantsInfo | $grantsInfo | |
LinkRenderer | $linkRenderer | |
LanguageFactory | $languageFactory | |
Language | $contentLanguage |
Definition at line 56 of file GrantsLocalization.php.
MediaWiki\Permissions\GrantsLocalization::getGrantDescription | ( | string | $grant, |
$lang = null ) |
Fetch the description of the grant.
string | $grant | |
Language | string | null | $lang |
Definition at line 74 of file GrantsLocalization.php.
References $lang.
MediaWiki\Permissions\GrantsLocalization::getGrantDescriptions | ( | array | $grants, |
$lang = null ) |
Fetch the descriptions for the grants.
string[] | $grants | |
Language | string | null | $lang |
Definition at line 107 of file GrantsLocalization.php.
References $lang.
MediaWiki\Permissions\GrantsLocalization::getGrantsLink | ( | string | $grant, |
$lang = null ) |
Generate a link to Special:ListGrants for a particular grant name.
This should be used to link end users to a full description of what rights they are giving when they authorize a grant.
string | $grant | the grant name |
Language | string | null | $lang |
Definition at line 126 of file GrantsLocalization.php.
MediaWiki\Permissions\GrantsLocalization::getGrantsWikiText | ( | $grantsFilter, | |
$lang = null ) |
Generate wikitext to display a list of grants.
string[] | null | $grantsFilter | If non-null, only display these grants. |
Language | string | null | $lang |
Definition at line 139 of file GrantsLocalization.php.
References $lang.