69 return new Message( $key, $params );
89 'blockerName' => $blocker ? $blocker->getName() :
'',
113 $info[
'expiry'] = $language->
formatExpiry( $info[
'expiry'],
true,
'infinity', $user );
114 $info[
'timestamp'] = $language->
userTimeAndDate( $info[
'timestamp'], $user );
115 $info[
'blockerName'] = $language->
embedBidi( $info[
'blockerName'] );
116 $info[
'targetName'] = $language->
embedBidi( $info[
'targetName'] );
131 if ( $reason->text ===
'' ) {
132 $message =
new Message(
'blockednoreason', [], $language );
133 return $message->plain();
135 return $reason->message->inLanguage( $language )->plain();
154 if ( $blocker->
getId() === 0 ) {
162 $blockerUserpage = PageReferenceValue::localReference(
NS_USER, $blocker->
getName() );
164 $this->titleFormatter->getText( $blockerUserpage )
166 $prefixedText = $this->titleFormatter->getPrefixedText( $blockerUserpage );
167 return "[[{$prefixedText}|{$blockerText}]]";
177 $key =
'blockedtext';
180 $key =
'autoblockedtext';
182 $key =
'blockedtext-partial';
185 $key =
'systemblockedtext';
187 $key =
'blockedtext-composite';
228 static function ( $id ) {
231 array_filter( $info[
'identifier'],
'is_int' )
234 $idsMsg =
new Message(
'blockedtext-composite-no-ids', [], $language );
236 $idsMsg =
new Message(
'blockedtext-composite-ids', [ $ids ], $language );
238 $info[
'identifier'] = $idsMsg->plain();
254 foreach ( $order as $item ) {
255 $params[] = $info[$item];
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
formatExpiry( $expiry, $format=true, $infinity='infinity', $user=null)
Decode an expiry (block, protection, etc) which has come from the DB.
embedBidi( $text='')
Wraps argument with unicode control characters for directionality safety.
userTimeAndDate( $ts, UserIdentity $user, array $options=[])
Get the formatted date and time for the given timestamp and formatted for the given user.
commaList(array $list)
Take a list of strings and build a locale-friendly comma-separated list, using the local comma-separa...
The Message class deals with fetching and processing of interface message into a variety of formats.