MediaWiki master
|
A service class for getting formatted information about a block. More...
Public Member Functions | |
__construct (TitleFormatter $titleFormatter, HookContainer $hookContainer, UserIdentityUtils $userIdentityUtils, LanguageFactory $languageFactory, LocalizationContext $uiContext) | |
getMessage (Block $block, UserIdentity $user, $language, string $ip) | |
Get a block error message. | |
getMessages (Block $block, UserIdentity $user, string $ip) | |
Get block error messages for all of the blocks that apply to a user. | |
A service class for getting formatted information about a block.
To obtain an instance, use MediaWikiServices::getInstance()->getBlockErrorFormatter().
Definition at line 41 of file BlockErrorFormatter.php.
MediaWiki\Block\BlockErrorFormatter::__construct | ( | TitleFormatter | $titleFormatter, |
HookContainer | $hookContainer, | ||
UserIdentityUtils | $userIdentityUtils, | ||
LanguageFactory | $languageFactory, | ||
LocalizationContext | $uiContext ) |
Definition at line 49 of file BlockErrorFormatter.php.
MediaWiki\Block\BlockErrorFormatter::getMessage | ( | Block | $block, |
UserIdentity | $user, | ||
$language, | |||
string | $ip ) |
Get a block error message.
Different message keys are chosen depending on the block features. Message parameters are formatted for the specified user and language.
If passed a CompositeBlock, will get a generic message stating that there are multiple blocks. To get all the block messages, use getMessages instead.
Block | $block | |
UserIdentity | $user | |
mixed | $language | Unused since 1.42 |
string | $ip |
Definition at line 85 of file BlockErrorFormatter.php.
MediaWiki\Block\BlockErrorFormatter::getMessages | ( | Block | $block, |
UserIdentity | $user, | ||
string | $ip ) |
Get block error messages for all of the blocks that apply to a user.
Block | $block | |
UserIdentity | $user | |
string | $ip |
Definition at line 105 of file BlockErrorFormatter.php.