46 private function getBlockDetails(
50 if ( $language ===
null ) {
51 $language = $this->getLanguage();
57 $vals[
'blockid'] = $block->
getId();
58 $vals[
'blockedby'] = $blocker ? $blocker->getName() :
'';
59 $vals[
'blockedbyid'] = $blocker ? $blocker->getId() : 0;
61 ->message->inLanguage( $language )->plain();
63 $expiry = ApiResult::formatExpiry( $block->
getExpiry(),
'infinite' );
64 $vals[
'blockexpiry'] = $expiry;
71 $vals[
'blockedtimestampformatted'] = $language->formatExpiry(
74 if ( $expiry !==
'infinite' ) {
75 $vals[
'blockexpiryformatted'] = $language->formatExpiry(
76 $expiry,
true,
'infinity', $user
78 $vals[
'blockexpiryrelative'] = $language->getHumanTimestamp(
84 $vals[
'systemblocktype'] = $block->getSystemBlockType();
99 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.