MediaWiki  REL1_22
ThumbnailImage Class Reference

Media transform output for images. More...

Inheritance diagram for ThumbnailImage:
Collaboration diagram for ThumbnailImage:

List of all members.

Public Member Functions

 __construct ($file, $url, $path=false, $parameters=array())
 Get a thumbnail object from a file and parameters.
 toHtml ($options=array())
 Return HTML.

Detailed Description

Media transform output for images.

Definition at line 234 of file MediaTransformOutput.php.


Constructor & Destructor Documentation

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.

Parameters:
$fileFile object
string$urlURL path to the thumb
$pathString|bool|null: filesystem path to the thumb
array$parametersAssociative array of parameters
Access:
private

Definition at line 248 of file MediaTransformOutput.php.


Member Function Documentation

ThumbnailImage::toHtml ( options = array())

Return HTML.

<img ... /> tag for the thumbnail, will include width and height attributes and a blank alt text (as required).

Parameters:
array$optionsAssociative 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.

Exceptions:
MWException
Returns:
string

Reimplemented from MediaTransformOutput.

Definition at line 314 of file MediaTransformOutput.php.


The documentation for this class was generated from the following file: