MediaWiki REL1_39
MediaWiki\Block\BlockErrorFormatter Class Reference

A service class for getting formatted information about a block. More...

Public Member Functions

 __construct (TitleFormatter $titleFormatter)
 
 getMessage (Block $block, UserIdentity $user, Language $language, $ip)
 Get a block error message.
 

Detailed Description

A service class for getting formatted information about a block.

To obtain an instance, use MediaWikiServices::getInstance()->getBlockErrorFormatter().

Since
1.35

Definition at line 36 of file BlockErrorFormatter.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Block\BlockErrorFormatter::__construct ( TitleFormatter  $titleFormatter)
Parameters
TitleFormatter$titleFormatter

Definition at line 44 of file BlockErrorFormatter.php.

Member Function Documentation

◆ getMessage()

MediaWiki\Block\BlockErrorFormatter::getMessage ( Block  $block,
UserIdentity  $user,
Language  $language,
  $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.

Parameters
Block$block
UserIdentity$user
Language$language
string$ip
Returns
Message

Definition at line 61 of file BlockErrorFormatter.php.


The documentation for this class was generated from the following file: