MediaWiki
REL1_22
|
Media transform output for images. More...
Public Member Functions | |
__construct ($file, $url, $path=false, $parameters=array()) | |
Get a thumbnail object from a file and parameters. | |
toHtml ($options=array()) | |
Return HTML. |
Media transform output for images.
Definition at line 234 of file MediaTransformOutput.php.
ThumbnailImage::__construct | ( | $ | file, |
$ | url, | ||
$ | path = false , |
||
$ | parameters = array() |
||
) |
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. $parameters should include, as a minimum, (file) 'width' and 'height'. It may also include a 'page' parameter for multipage files.
$file | File object | |
string | $url | URL path to the thumb |
$path | String|bool|null: filesystem path to the thumb | |
array | $parameters | Associative array of parameters |
Definition at line 248 of file MediaTransformOutput.php.
ThumbnailImage::toHtml | ( | $ | options = array() | ) |
Return HTML.
<img ... /> tag for the thumbnail, will include width and height attributes and a blank alt text (as required).
array | $options | 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 override-width Override width attribute. Should generally not set override-height Override height attribute. Should generally not set 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 parser-extlink-* Attributes added by parser for external links: parser-extlink-rel: add rel="nofollow" parser-extlink-target: link target, but overridden by 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.
MWException |
Reimplemented from MediaTransformOutput.
Definition at line 314 of file MediaTransformOutput.php.