54 return new Message( $key, $params );
73 'targetName' => (string)$block->
getTarget(),
75 'blockerId' => $block->
getBy(),
99 $info[
'expiry'] = $language->
formatExpiry( $info[
'expiry'] );
100 $info[
'timestamp'] = $language->
userTimeAndDate( $info[
'timestamp'], $user );
101 $info[
'blockerName'] = $language->
embedBidi( $info[
'blockerName'] );
102 $info[
'targetName'] = $language->
embedBidi( $info[
'targetName'] );
117 if ( $reason->text ===
'' ) {
118 $message =
new Message(
'blockednoreason', [], $language );
119 return $message->text();
121 return $reason->message->inLanguage( $language )->plain();
135 if ( $blockerId === 0 ) {
141 $blockerUserpage = $blocker->getUserPage();
142 $blockerText = $language->
embedBidi( $blockerUserpage->getText() );
143 return "[[{$blockerUserpage->getPrefixedText()}|{$blockerText}]]";
153 $key =
'blockedtext';
156 $key =
'autoblockedtext';
158 $key =
'blockedtext-partial';
161 $key =
'systemblockedtext';
163 $key =
'blockedtext-composite';
197 $info[
'blockerName'],
208 array_filter( $info[
'identifier'],
'is_int' )
211 $idsMsg =
new Message(
'blockedtext-composite-no-ids', [], $language );
213 $idsMsg =
new Message(
'blockedtext-composite-ids', [ $ids ], $language );
215 $info[
'identifier'] = $idsMsg->plain();
231 foreach ( $order as $item ) {
232 $params[] = $info[$item];
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
formatExpiry( $expiry, $format=true, $infinity='infinity')
Decode an expiry (block, protection, etc) which has come from the DB.
userTimeAndDate( $ts, User $user, array $options=[])
Get the formatted date and time for the given timestamp and formatted for the given user.
embedBidi( $text='')
Wraps argument with unicode control characters for directionality safety.
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.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static newFromId( $id)
Static factory method for creation from a given user ID.