MediaWiki  1.34.0
TransformTooBigImageAreaError.php
Go to the documentation of this file.
1 <?php
31  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  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:1264
TransformTooBigImageAreaError\getHttpStatusCode
getHttpStatusCode()
Definition: TransformTooBigImageAreaError.php:44
TransformTooBigImageAreaError
Shortcut class for parameter file size errors.
Definition: TransformTooBigImageAreaError.php:30