| [ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Image gallery. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
| File Size: | 366 lines (10 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| factory( $mode = false, IContextSource $context = null ) X-Ref |
| Get a new image gallery. This is the method other callers should use to get a gallery. param: string|bool $mode Mode to use. False to use the default param: IContextSource|null $context return: ImageGalleryBase |
| loadModes() X-Ref |
| No description |
| __construct( $mode = 'traditional', IContextSource $context = null ) X-Ref |
| Create a new image gallery object. You should not call this directly, but instead use ImageGalleryBase::factory(). param: string $mode param: IContextSource|null $context |
| setParser( $parser ) X-Ref |
| Register a parser object. If you do not set this and the output of this gallery ends up in parser cache, the javascript will break! param: Parser $parser |
| setHideBadImages( $flag = true ) X-Ref |
| Set bad image flag param: bool $flag |
| setCaption( $caption ) X-Ref |
| Set the caption (as plain text) param: string $caption Caption |
| setCaptionHtml( $caption ) X-Ref |
| Set the caption (as HTML) param: string $caption Caption |
| setPerRow( $num ) X-Ref |
| Set how many images will be displayed per row. param: int $num Integer >= 0; If perrow=0 the gallery layout will adapt |
| setWidths( $num ) X-Ref |
| Set how wide each image will be, in pixels. param: int $num Integer > 0; invalid numbers will be ignored |
| setHeights( $num ) X-Ref |
| Set how high each image will be, in pixels. param: int $num Integer > 0; invalid numbers will be ignored |
| setAdditionalOptions( $options ) X-Ref |
| Allow setting additional options. This is meant to allow extensions to add additional parameters to <gallery> parser tag. param: array $options Attributes of gallery tag |
| add( $title, $html = '', $alt = '', $link = '', $handlerOpts = array() X-Ref |
| Add an image to the gallery. param: Title $title Title object of the image that is added to the gallery param: string $html Additional HTML text to be shown. The name and size param: string $alt Alt text for the image param: string $link Override image link (optional) param: array $handlerOpts Array of options for image handler (aka page number) |
| insert( $title, $html = '', $alt = '', $link = '', $handlerOpts = array() X-Ref |
| Add an image at the beginning of the gallery. param: Title $title Title object of the image that is added to the gallery param: string $html Additional HTML text to be shown. The name and size param: string $alt Alt text for the image param: string $link Override image link (optional) param: array $handlerOpts Array of options for image handler (aka page number) |
| getImages() X-Ref |
| Returns the list of images this gallery contains return: array |
| isEmpty() X-Ref |
| isEmpty() returns true if the gallery contains no images return: bool |
| setShowBytes( $f ) X-Ref |
| Enable/Disable showing of the file size of an image in the gallery. Enabled by default. param: bool $f Set to false to disable |
| setShowFilename( $f ) X-Ref |
| Enable/Disable showing of the filename of an image in the gallery. Enabled by default. param: bool $f Set to false to disable |
| setAttributes( $attribs ) X-Ref |
| Set arbitrary attributes to go on the HTML gallery output element. Should be suitable for a <ul> element. Note -- if taking from user input, you should probably run through Sanitizer::validateAttributes() first. param: array $attribs Array of HTML attribute pairs |
| count() X-Ref |
return: int Number of images in the gallery |
| setContextTitle( $title ) X-Ref |
| Set the contextual title param: Title $title Contextual title |
| getContextTitle() X-Ref |
| Get the contextual title, if applicable return: Title|bool Title or false |
| getRenderLang() X-Ref |
| Determines the correct language to be used for this image gallery return: Language |
| Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |