|
MediaWiki master
|
Packed image gallery. More...
Inherits MediaWiki\Gallery\TraditionalImageGallery.
Inherited by MediaWiki\Gallery\PackedOverlayImageGallery.

Public Member Functions | |||||||
| __construct ( $mode='traditional', ?IContextSource $context=null) | |||||||
Create a new image gallery object.You should not call this directly, but instead use ImageGalleryBase::factory().
| |||||||
| setPerRow ( $num) | |||||||
| Do not support per-row on packed. | |||||||
Public Member Functions inherited from MediaWiki\Gallery\TraditionalImageGallery | |||||||
| toHTML () | |||||||
| Return a HTML representation of the image gallery. | |||||||
Public Member Functions inherited from MediaWiki\Gallery\ImageGalleryBase | |||||||
| add ( $title, $html='', $alt='', $link='', $handlerOpts=[], $loading=self::LOADING_DEFAULT, ?array $imageOptions=null) | |||||||
| 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=[], $loading=self::LOADING_DEFAULT, ?array $imageOptions=null) | |||||||
| 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) | |||||||
| setParser ( $parser) | |||||||
| Register a parser object. | |||||||
| setShowBytes ( $f) | |||||||
| Enable/Disable showing of the file size of an image in the gallery. | |||||||
| setShowDimensions ( $f) | |||||||
| Enable/Disable showing of the dimensions 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 MediaWiki\Context\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. | |||||||
| getActionName () | |||||||
| Get the action name for the current web request. | |||||||
| getAuthority () | |||||||
| getConfig () | |||||||
| getContext () | |||||||
| Get the base IContextSource object. | |||||||
| getCsrfTokenSet () | |||||||
| Get a repository to obtain and match CSRF tokens. | |||||||
| getLanguage () | |||||||
| getLanguageCode () | |||||||
| getOutput () | |||||||
| getRequest () | |||||||
| getSkin () | |||||||
| getTiming () | |||||||
| getTitle () | |||||||
| getUser () | |||||||
| getWikiPage () | |||||||
| Get the WikiPage object. | |||||||
| msg ( $key,... $params) | |||||||
| Get a Message object with context set Parameters are the same as wfMessage() | |||||||
| setContext (IContextSource $context) | |||||||
Protected Member Functions | |||||||
| adjustImageParameters ( $thumb, &$imageParameters) | |||||||
Adjust the image parameters for a thumbnail.Used by a subclass to insert extra high resolution images.
| |||||||
| 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.This is the div with the class of "thumb".
| |||||||
| getThumbPadding () | |||||||
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).
| |||||||
| getThumbParams ( $img) | |||||||
| getVPad ( $boxHeight, $thumbHeight) | |||||||
Get vertical padding for a thumbnail.Generally this is the total height minus how high the thumb is.
| |||||||
Protected Member Functions inherited from MediaWiki\Gallery\TraditionalImageGallery | |||||||
| getAllPadding () | |||||||
| Get total padding. | |||||||
| getCaptionHtml (Title $nt, Language $lang, LinkRenderer $linkRenderer) | |||||||
| getCaptionLength () | |||||||
| Length (in characters) to truncate filename to in caption when using "showfilename" (if int). | |||||||
| getGBBorders () | |||||||
| Get how much extra space the borders around the image takes up. | |||||||
| getGBWidthOverwrite ( $thumb) | |||||||
| Allows overwriting the computed width of the gallerybox with a string, like '100'. | |||||||
| wrapGalleryText ( $galleryText, $thumb) | |||||||
| Add the wrapper html around the thumb's caption. | |||||||
Protected Member Functions inherited from MediaWiki\Gallery\ImageGalleryBase | |||||||
| getRenderLang () | |||||||
| Determines the correct language to be used for this image gallery. | |||||||
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\Gallery\ImageGalleryBase | |
| static | factory ( $mode=false, ?IContextSource $context=null) |
| Get a new image gallery. | |
Public Attributes inherited from MediaWiki\Gallery\ImageGalleryBase | |
| Parser false | $mParser |
| Registered parser object for output callbacks. | |
| const | LOADING_DEFAULT = 1 |
| const | LOADING_LAZY = 2 |
Protected Attributes inherited from MediaWiki\Gallery\ImageGalleryBase | |
| Title null | $contextTitle = null |
| Contextual title, used when images are being screened against the bad image list. | |
| array | $mAttribs = [] |
| string false | $mCaption = false |
| Gallery caption. | |
| bool int | $mCaptionLength = true |
| Length to truncate filename to in caption when using "showfilename". | |
| int | $mHeights |
| bool | $mHideBadImages |
| Hide bad images? | |
| array[] | $mImages |
| Gallery images. | |
| string | $mMode |
| Gallery mode. | |
| int | $mPerRow |
| bool | $mShowBytes |
| Whether to show the filesize in bytes in categories. | |
| bool | $mShowDimensions |
| Whether to show the dimensions in categories. | |
| bool | $mShowFilename |
| Whether to show the filename. | |
| int | $mWidths |
Packed image gallery.
All images adjusted to be same height.
Definition at line 16 of file PackedImageGallery.php.
| MediaWiki\Gallery\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 MediaWiki\Gallery\ImageGalleryBase.
Definition at line 18 of file PackedImageGallery.php.
|
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 MediaWiki\Gallery\TraditionalImageGallery.
Definition at line 88 of file PackedImageGallery.php.
|
protected |
Reimplemented from MediaWiki\Gallery\TraditionalImageGallery.
Definition at line 42 of file PackedImageGallery.php.
Referenced by MediaWiki\Gallery\PackedImageGallery\getGBWidth(), and MediaWiki\Gallery\PackedOverlayImageGallery\wrapGalleryText().
|
protected |
| MediaTransformOutput | false | $thumb | The thumbnail, or false if no thumb (which can happen) |
Reimplemented from MediaWiki\Gallery\TraditionalImageGallery.
Definition at line 81 of file PackedImageGallery.php.
References MediaWiki\Gallery\PackedImageGallery\getGBPadding(), and MediaWiki\Gallery\PackedImageGallery\getThumbDivWidth().
Referenced by MediaWiki\Gallery\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 MediaWiki\Gallery\TraditionalImageGallery.
Definition at line 99 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 MediaWiki\Gallery\TraditionalImageGallery.
Definition at line 67 of file PackedImageGallery.php.
References MediaWiki\Gallery\PackedImageGallery\getThumbPadding().
Referenced by MediaWiki\Gallery\PackedImageGallery\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 MediaWiki\Gallery\TraditionalImageGallery.
Definition at line 37 of file PackedImageGallery.php.
Referenced by MediaWiki\Gallery\PackedImageGallery\getThumbDivWidth(), MediaWiki\Gallery\PackedImageGallery\getVPad(), and MediaWiki\Gallery\PackedOverlayImageGallery\wrapGalleryText().
|
protected |
| File | false | $img | The file being transformed. May be false |
Reimplemented from MediaWiki\Gallery\TraditionalImageGallery.
Definition at line 50 of file PackedImageGallery.php.
References MediaWiki\Gallery\ImageGalleryBase\$mWidths, and MEDIATYPE_AUDIO.
|
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 MediaWiki\Gallery\TraditionalImageGallery.
Definition at line 32 of file PackedImageGallery.php.
References MediaWiki\Gallery\PackedImageGallery\getThumbPadding().
| MediaWiki\Gallery\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 MediaWiki\Gallery\ImageGalleryBase.
Definition at line 108 of file PackedImageGallery.php.