46 private function getBlockDetails(
50 $language ??= $this->getLanguage();
55 $vals[
'blockid'] = $block->
getId();
56 $vals[
'blockedby'] = $blocker ? $blocker->getName() :
'';
57 $vals[
'blockedbyid'] = $blocker ? $blocker->getId() : 0;
59 ->message->inLanguage( $language )->plain();
61 $expiry = ApiResult::formatExpiry( $block->
getExpiry(),
'infinite' );
62 $vals[
'blockexpiry'] = $expiry;
69 $vals[
'blockedtimestampformatted'] = $language->formatExpiry(
72 if ( $expiry !==
'infinite' ) {
73 $vals[
'blockexpiryformatted'] = $language->formatExpiry(
74 $expiry,
true,
'infinity', $user
76 $vals[
'blockexpiryrelative'] = $language->getHumanTimestamp(
82 $vals[
'systemblocktype'] = $block->getSystemBlockType();
97 abstract public function getLanguage();
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Library for creating and parsing MW-style timestamps.