Go to the documentation of this file.
66 return new Message( $key, $params );
85 'targetName' => (string)$block->
getTarget(),
87 'blockerId' => $block->
getBy(),
111 $info[
'expiry'] = $language->
formatExpiry( $info[
'expiry'] );
112 $info[
'timestamp'] = $language->
userTimeAndDate( $info[
'timestamp'], $user );
113 $info[
'blockerName'] = $language->
embedBidi( $info[
'blockerName'] );
114 $info[
'targetName'] = $language->
embedBidi( $info[
'targetName'] );
129 if ( $reason->text ===
'' ) {
130 $message =
new Message(
'blockednoreason', [], $language );
131 return $message->text();
133 return $reason->message->inLanguage( $language )->plain();
147 if ( $blockerId === 0 ) {
152 $blocker = $this->userFactory->newFromId( (
int)$blockerId );
153 $blockerUserpage = $blocker->getUserPage();
154 $blockerText = $language->
embedBidi( $blockerUserpage->getText() );
155 return "[[{$blockerUserpage->getPrefixedText()}|{$blockerText}]]";
165 $key =
'blockedtext';
168 $key =
'autoblockedtext';
170 $key =
'blockedtext-partial';
173 $key =
'systemblockedtext';
175 $key =
'blockedtext-composite';
209 $info[
'blockerName'],
220 array_filter( $info[
'identifier'],
'is_int' )
223 $idsMsg =
new Message(
'blockedtext-composite-no-ids', [], $language );
225 $idsMsg =
new Message(
'blockedtext-composite-ids', [ $ids ], $language );
227 $info[
'identifier'] = $idsMsg->plain();
243 foreach ( $order as $item ) {
244 $params[] = $info[$item];
commaList(array $list)
Take a list of strings and build a locale-friendly comma-separated list, using the local comma-separa...
embedBidi( $text='')
Wraps argument with unicode control characters for directionality safety.
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.
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,...
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...