MediaWiki  REL1_19
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, $width, $height, $path=false, $page=false)
 Get a thumbnail object from a file and parameters.
 toHtml ($options=array())
 Return HTML.

Detailed Description

Media transform output for images.

Definition at line 180 of file MediaTransformOutput.php.


Constructor & Destructor Documentation

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.

Parameters:
$fileFile object
$urlString: URL path to the thumb
$widthInteger: file's width
$heightInteger: file's height
$pathString|false|null: filesystem path to the thumb
$pageInteger: page number, for multipage files
Access:
private

Definition at line 194 of file MediaTransformOutput.php.

References MediaTransformOutput\$file, MediaTransformOutput\$height, MediaTransformOutput\$page, MediaTransformOutput\$path, MediaTransformOutput\$url, and MediaTransformOutput\$width.


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:
$optionsarray 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.

Returns:
string

Reimplemented from MediaTransformOutput.

Definition at line 230 of file MediaTransformOutput.php.

References $options, $title, Xml\element(), MediaTransformOutput\getDescLinkAttribs(), and MediaTransformOutput\linkWrap().

Here is the call graph for this function:


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