MediaWiki
REL1_22
|
Public Member Functions | |
toHTML () | |
Return a HTML representation of the image gallery. | |
Protected Member Functions | |
adjustImageParameters ($thumb, &$imageParameters) | |
Adjust the image parameters for a thumbnail. | |
getAllPadding () | |
Get total padding. | |
getGBBorders () | |
Get how much extra space the borders around the image takes up. | |
getGBPadding () | |
getGBWidth ($thumb) | |
Width of gallerybox . | |
getModules () | |
Get a list of modules to include in the page. | |
getThumbDivWidth ($thumbWidth) | |
Get the width of the inner div that contains the thumbnail in question. | |
getThumbPadding () | |
How much padding such the thumb have between image and inner div that that contains the border. | |
getThumbParams ($img) | |
Get the transform parameters for a thumbnail. | |
getVPad ($boxHeight, $thumbHeight) | |
Get vertical padding for a thumbnail. | |
wrapGalleryText ($galleryText, $thumb) | |
Add the wrapper html around the thumb's caption. |
Definition at line 23 of file TraditionalImageGallery.php.
TraditionalImageGallery::adjustImageParameters | ( | $ | thumb, |
&$ | imageParameters | ||
) | [protected] |
Adjust the image parameters for a thumbnail.
Used by a subclass to insert extra high resolution images.
MediaTransformOutput | $thumb | The thumbnail |
Array | $imageParameters | Array of options |
Reimplemented in PackedImageGallery.
Definition at line 313 of file TraditionalImageGallery.php.
Referenced by toHTML().
TraditionalImageGallery::getAllPadding | ( | ) | [protected] |
Get total padding.
Definition at line 241 of file TraditionalImageGallery.php.
References getGBBorders(), getGBPadding(), and getThumbPadding().
Referenced by toHTML().
TraditionalImageGallery::getGBBorders | ( | ) | [protected] |
Get how much extra space the borders around the image takes up.
For this mode, it is 2px borders on each side + 2px implied padding on each side from the stylesheet, giving us 2*2+2*2 = 8.
Reimplemented in NolinesImageGallery.
Definition at line 232 of file TraditionalImageGallery.php.
Referenced by getAllPadding().
TraditionalImageGallery::getGBPadding | ( | ) | [protected] |
Reimplemented in PackedImageGallery.
Definition at line 221 of file TraditionalImageGallery.php.
Referenced by getAllPadding(), and getGBWidth().
TraditionalImageGallery::getGBWidth | ( | $ | thumb | ) | [protected] |
Width of gallerybox .
Generally is the width of the image, plus padding on image plus padding on gallerybox.
Mixed | $thumb | MediaTransformObject object or false. |
Reimplemented in PackedImageGallery.
Definition at line 291 of file TraditionalImageGallery.php.
References getGBPadding(), and getThumbPadding().
Referenced by toHTML().
TraditionalImageGallery::getModules | ( | ) | [protected] |
Get a list of modules to include in the page.
Primarily intended for subclasses.
Reimplemented in PackedImageGallery.
Definition at line 302 of file TraditionalImageGallery.php.
References array().
Referenced by toHTML().
TraditionalImageGallery::getThumbDivWidth | ( | $ | thumbWidth | ) | [protected] |
Get the width of the inner div that contains the thumbnail in question.
This is the div with the class of "thumb".
int | $thumbWidth | The width of the thumbnail. |
Reimplemented in PackedImageGallery.
Definition at line 277 of file TraditionalImageGallery.php.
References getThumbPadding().
Referenced by toHTML().
TraditionalImageGallery::getThumbPadding | ( | ) | [protected] |
How much padding such the thumb have between image and inner div that that contains the border.
This is both for verical and horizontal padding. (However, it is cut in half in the vertical direction).
Reimplemented in PackedImageGallery, and NolinesImageGallery.
Definition at line 211 of file TraditionalImageGallery.php.
Referenced by getAllPadding(), getGBWidth(), getThumbDivWidth(), getVPad(), and toHTML().
TraditionalImageGallery::getThumbParams | ( | $ | img | ) | [protected] |
Get the transform parameters for a thumbnail.
File | $img | The file in question. May be false for invalid image |
Reimplemented in PackedImageGallery.
Definition at line 263 of file TraditionalImageGallery.php.
References array().
Referenced by toHTML().
TraditionalImageGallery::getVPad | ( | $ | boxHeight, |
$ | thumbHeight | ||
) | [protected] |
Get vertical padding for a thumbnail.
Generally this is the total height minus how high the thumb is.
int | $boxHeight | How high we want the box to be. |
int | $thumbHeight | How high the thumbnail is. |
Reimplemented in PackedImageGallery, and NolinesImageGallery.
Definition at line 254 of file TraditionalImageGallery.php.
References getThumbPadding().
Referenced by toHTML().
Return a HTML representation of the image gallery.
For each image in the gallery, display
Reimplemented from ImageGalleryBase.
Definition at line 37 of file TraditionalImageGallery.php.
References $attribs, $link, $options, $output, $params, adjustImageParameters(), array(), as, block, getAllPadding(), ImageGalleryBase\getContextTitle(), getGBWidth(), getModules(), ContextSource\getOutput(), ImageGalleryBase\getRenderLang(), getThumbDivWidth(), getThumbPadding(), getThumbParams(), getVPad(), http, Linker\link(), list, Sanitizer\mergeAttributes(), ContextSource\msg(), Xml\openElement(), tags(), that, wfFindFile(), wfIsBadImage(), wfRunHooks(), and wrapGalleryText().
TraditionalImageGallery::wrapGalleryText | ( | $ | galleryText, |
$ | thumb | ||
) | [protected] |
Add the wrapper html around the thumb's caption.
String | $galleryText | The caption |
MediaTransformOutput | boolean | $thumb | The thumb this caption is for or false for bad image. |
Reimplemented in PackedOverlayImageGallery.
Definition at line 195 of file TraditionalImageGallery.php.
Referenced by toHTML().