MediaWiki REL1_35
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 // messages used: size-pixel, size-kilopixel, size-megapixel, size-gigapixel, size-terapixel,
43 // size-petapixel, size-exapixel, size-zettapixel, size-yottapixel, size-ronnapixel, size-quettapixel
44 $msg->getLanguage()->formatComputingNumbers( $maxImageArea, 1000, "size-$1pixel" )
45 );
46
47 parent::__construct( 'thumbnail_error',
48 max( $params['width'] ?? 0, 120 ),
49 max( $params['height'] ?? 0, 120 ),
50 $msg
51 );
52 }
53
54 public function getHttpStatusCode() {
55 return 400;
56 }
57}
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:535
getLanguage()
Returns the Language of the Message.
Definition Message.php:418
Shortcut class for parameter file size errors.
__construct( $params, $maxImageArea)
Stable to call.