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