MediaWiki REL1_37
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}
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Basic media transform error class.
params(... $args)
Adds parameters to the parameter list of this message.
Definition Message.php:498
getLanguage()
Returns the Language of the Message.
Definition Message.php:379
Shortcut class for parameter file size errors.