17use Wikimedia\Timestamp\TimestampFormat as TS;
56 'blockid' => $block->
getId(),
57 'blockedby' => $blocker ? $blocker->getName() :
'',
58 'blockedbyid' => $blocker ? $blocker->getId() : 0,
59 'blockreason' => $block->
getReasonComment()->message->inLanguage( $language )->plain(),
61 'blockexpiry' => $expiry,
69 $vals[
'blockowntalk'] = !$block->isUsertalkEditAllowed();
70 if ( $block->getHideBlock() ) {
71 $vals[
'blockhidden'] =
true;
75 $vals[
'blockautoblocking'] = $block->isAutoblocking();
79 $vals[
'blockedtimestampformatted'] = $language->
formatExpiry(
82 if ( $expiry !==
'infinite' ) {
84 $expiry,
true,
'infinity', $user
92 $vals[
'systemblocktype'] = $block->getSystemBlockType();
97 foreach ( $block->getOriginalBlocks() as $singleBlock ) {
98 $components[] = $this->
getBlockDetails( $singleBlock, $language, $user );
100 $vals[
'blockcomponents'] = $components;
113 return 'autoblocked';
wfTimestamp( $outputtype=TS::UNIX, $ts=0)
Get a timestamp string in one of various formats.
if(!defined('MW_SETUP_CALLBACK'))