MediaWiki  master
TransformTooBigImageAreaError.php
Go to the documentation of this file.
1 <?php
32 
39  public function __construct( $params, $maxImageArea ) {
40  $msg = wfMessage( 'thumbnail_toobigimagearea' );
41  $msg->params(
42  $msg->getLanguage()->formatComputingNumbers( $maxImageArea, 1000, "size-$1pixel" )
43  );
44 
45  parent::__construct( 'thumbnail_error',
46  max( $params['width'] ?? 0, 120 ),
47  max( $params['height'] ?? 0, 120 ),
48  $msg
49  );
50  }
51 
52  public function getHttpStatusCode() {
53  return 400;
54  }
55 }
MediaTransformError
Basic media transform error class.
Definition: MediaTransformError.php:31
MediaTransformError\$msg
Message $msg
Definition: MediaTransformError.php:33
TransformTooBigImageAreaError\__construct
__construct( $params, $maxImageArea)
Definition: TransformTooBigImageAreaError.php:39
wfMessage
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Definition: GlobalFunctions.php:1183
Message\getLanguage
getLanguage()
Returns the Language of the Message.
Definition: Message.php:364
TransformTooBigImageAreaError\getHttpStatusCode
getHttpStatusCode()
Definition: TransformTooBigImageAreaError.php:52
TransformTooBigImageAreaError
Shortcut class for parameter file size errors.
Definition: TransformTooBigImageAreaError.php:31
Message\params
params(... $args)
Adds parameters to the parameter list of this message.
Definition: Message.php:483