MediaWiki
REL1_19
|
Media transform output for images. More...
Public Member Functions | |
__construct ($file, $url, $width, $height, $path=false, $page=false) | |
Get a thumbnail object from a file and parameters. | |
toHtml ($options=array()) | |
Return HTML. |
Media transform output for images.
Definition at line 180 of file MediaTransformOutput.php.
ThumbnailImage::__construct | ( | $ | file, |
$ | url, | ||
$ | width, | ||
$ | height, | ||
$ | path = false , |
||
$ | page = false |
||
) |
Get a thumbnail object from a file and parameters.
If $path is set to null, the output file is treated as a source copy. If $path is set to false, no output file will be created.
$file | File object |
$url | String: URL path to the thumb |
$width | Integer: file's width |
$height | Integer: file's height |
$path | String|false|null: filesystem path to the thumb |
$page | Integer: page number, for multipage files |
Definition at line 194 of file MediaTransformOutput.php.
References MediaTransformOutput\$file, MediaTransformOutput\$height, MediaTransformOutput\$page, MediaTransformOutput\$path, MediaTransformOutput\$url, and MediaTransformOutput\$width.
ThumbnailImage::toHtml | ( | $ | options = array() | ) |
Return HTML.
<img ... /> tag for the thumbnail, will include width and height attributes and a blank alt text (as required).
$options | array Associative array of options. Boolean options should be indicated with a value of true for true, and false or absent for false. |
alt HTML alt attribute title HTML title attribute desc-link Boolean, show a description link file-link Boolean, show a file download link valign vertical-align property, if the output is an inline element img-class Class applied to the <img> tag, if there is such a tag desc-query String, description link query params custom-url-link Custom URL to link to custom-title-link Custom Title object to link to custom target-link Value of the target attribute, for custom-target-link
For images, desc-link and file-link are implemented as a click-through. For sounds and videos, they may be displayed in other ways.
Reimplemented from MediaTransformOutput.
Definition at line 230 of file MediaTransformOutput.php.
References $options, $title, Xml\element(), MediaTransformOutput\getDescLinkAttribs(), and MediaTransformOutput\linkWrap().