MediaWiki REL1_28
|
Public Member Functions | |
__construct ( $mode='traditional', IContextSource $context=null) | |
Create a new image gallery object. | |
setPerRow ( $num) | |
Do not support per-row on packed. | |
Public Member Functions inherited from TraditionalImageGallery | |
toHTML () | |
Return a HTML representation of the image gallery. | |
Public Member Functions inherited from ImageGalleryBase | |
add ( $title, $html='', $alt='', $link='', $handlerOpts=[]) | |
Add an image to the gallery. | |
count () | |
getContextTitle () | |
Get the contextual title, if applicable. | |
getImages () | |
Returns the list of images this gallery contains. | |
insert ( $title, $html='', $alt='', $link='', $handlerOpts=[]) | |
Add an image at the beginning of the gallery. | |
isEmpty () | |
isEmpty() returns true if the gallery contains no images | |
setAdditionalOptions ( $options) | |
Allow setting additional options. | |
setAttributes ( $attribs) | |
Set arbitrary attributes to go on the HTML gallery output element. | |
setCaption ( $caption) | |
Set the caption (as plain text) | |
setCaptionHtml ( $caption) | |
Set the caption (as HTML) | |
setContextTitle ( $title) | |
Set the contextual title. | |
setHeights ( $num) | |
Set how high each image will be, in pixels. | |
setHideBadImages ( $flag=true) | |
Set bad image flag. | |
setParser ( $parser) | |
Register a parser object. | |
setShowBytes ( $f) | |
Enable/Disable showing of the file size of an image in the gallery. | |
setShowFilename ( $f) | |
Enable/Disable showing of the filename of an image in the gallery. | |
setWidths ( $num) | |
Set how wide each image will be, in pixels. | |
Public Member Functions inherited from ContextSource | |
canUseWikiPage () | |
Check whether a WikiPage object can be get with getWikiPage(). | |
exportSession () | |
Export the resolved user IP, HTTP headers, user ID, and session ID. | |
getConfig () | |
Get the Config object. | |
getContext () | |
Get the base IContextSource object. | |
getLanguage () | |
Get the Language object. | |
getOutput () | |
Get the OutputPage object. | |
getRequest () | |
Get the WebRequest object. | |
getSkin () | |
Get the Skin object. | |
getStats () | |
Get the Stats object. | |
getTiming () | |
Get the Timing object. | |
getTitle () | |
Get the Title object. | |
getUser () | |
Get the User object. | |
getWikiPage () | |
Get the WikiPage object. | |
msg () | |
Get a Message object with context set Parameters are the same as wfMessage() | |
setContext (IContextSource $context) | |
Set the IContextSource object. | |
Public Attributes | |
const | SCALE_FACTOR = 1.5 |
We artificially have 1.5 the resolution neccessary so that we can scale it up by that much on the client side, without worrying about requesting a new image. | |
Public Attributes inherited from ImageGalleryBase | |
Parser | $mParser |
Registered parser object for output callbacks. | |
Protected Member Functions | |
adjustImageParameters ( $thumb, &$imageParameters) | |
Adjust the image parameters for a thumbnail. | |
getGBPadding () | |
getGBWidth ( $thumb) | |
getModules () | |
Add javascript which auto-justifies the rows by manipulating the image sizes. | |
getThumbDivWidth ( $thumbWidth) | |
Get the width of the inner div that contains the thumbnail in question. | |
getThumbPadding () | |
How much padding the thumb has between the image and the inner div that contains the border. | |
getThumbParams ( $img) | |
getVPad ( $boxHeight, $thumbHeight) | |
Get vertical padding for a thumbnail. | |
Protected Member Functions inherited from TraditionalImageGallery | |
getAllPadding () | |
Get total padding. | |
getGBBorders () | |
Get how much extra space the borders around the image takes up. | |
wrapGalleryText ( $galleryText, $thumb) | |
Add the wrapper html around the thumb's caption. | |
Protected Member Functions inherited from ImageGalleryBase | |
getRenderLang () | |
Determines the correct language to be used for this image gallery. | |
Additional Inherited Members | |
Static Public Member Functions inherited from ImageGalleryBase | |
static | factory ( $mode=false, IContextSource $context=null) |
Get a new image gallery. | |
Protected Attributes inherited from ImageGalleryBase | |
Title | $contextTitle = false |
Contextual title, used when images are being screened against the bad image list. | |
array | $mAttribs = [] |
bool string | $mCaption = false |
Gallery caption. | |
bool | $mHideBadImages |
Hide blacklisted images? | |
array | $mImages |
Gallery images. | |
string | $mMode |
Gallery mode. | |
bool | $mShowBytes |
Whether to show the filesize in bytes in categories. | |
bool | $mShowFilename |
Whether to show the filename. | |
Definition at line 23 of file PackedImageGallery.php.
PackedImageGallery::__construct | ( | $mode = 'traditional' , |
|
IContextSource | $context = null |
||
) |
Create a new image gallery object.
You should not call this directly, but instead use ImageGalleryBase::factory().
string | $mode | |
IContextSource | null | $context |
Reimplemented from ImageGalleryBase.
Definition at line 24 of file PackedImageGallery.php.
References ContextSource\$context.
|
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 from TraditionalImageGallery.
Definition at line 89 of file PackedImageGallery.php.
|
protected |
Reimplemented from TraditionalImageGallery.
Definition at line 45 of file PackedImageGallery.php.
Referenced by getGBWidth(), and PackedOverlayImageGallery\wrapGalleryText().
|
protected |
MediaTransformOutput | bool | $thumb | The thumbnail, or false if no thumb (which can happen) |
Reimplemented from TraditionalImageGallery.
Definition at line 83 of file PackedImageGallery.php.
References getGBPadding(), getThumbDivWidth(), and SCALE_FACTOR.
Referenced by PackedOverlayImageGallery\wrapGalleryText().
|
protected |
Add javascript which auto-justifies the rows by manipulating the image sizes.
Also ensures that the hover version of this degrades gracefully.
Reimplemented from TraditionalImageGallery.
Definition at line 100 of file PackedImageGallery.php.
|
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 from TraditionalImageGallery.
Definition at line 69 of file PackedImageGallery.php.
References getThumbPadding(), and SCALE_FACTOR.
Referenced by getGBWidth().
|
protected |
How much padding the thumb has between the image and the inner div that contains the border.
This is for both vertical and horizontal padding. (However, it is cut in half in the vertical direction).
Reimplemented from TraditionalImageGallery.
Definition at line 41 of file PackedImageGallery.php.
Referenced by getThumbDivWidth(), getVPad(), and PackedOverlayImageGallery\wrapGalleryText().
|
protected |
File | $img | The file being transformed. May be false |
Reimplemented from TraditionalImageGallery.
Definition at line 53 of file PackedImageGallery.php.
References MEDIATYPE_AUDIO, and SCALE_FACTOR.
|
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 from TraditionalImageGallery.
Definition at line 37 of file PackedImageGallery.php.
References getThumbPadding().
PackedImageGallery::setPerRow | ( | $num | ) |
Do not support per-row on packed.
It really doesn't work since the images have varying widths.
int | $num |
Reimplemented from ImageGalleryBase.
Definition at line 109 of file PackedImageGallery.php.
const PackedImageGallery::SCALE_FACTOR = 1.5 |
We artificially have 1.5 the resolution neccessary so that we can scale it up by that much on the client side, without worrying about requesting a new image.
Definition at line 35 of file PackedImageGallery.php.
Referenced by getGBWidth(), getThumbDivWidth(), and getThumbParams().