MediaWiki REL1_34
|
Handler for the "ParserMakeImageParams" and "AfterParserFetchFileAndTitle" hooks. More...
Public Member Functions | |
doAfterParserFetchFileAndTitle (Parser $parser, ImageGalleryBase $gallery) | |
doParserMakeImageParams (Title $title, $file, array &$params, Parser $parser) | |
Static Public Member Functions | |
static | onAfterParserFetchFileAndTitle (Parser $parser, ImageGalleryBase $gallery) |
AfterParserFetchFileAndTitle hook handler, saves information about gallery images. | |
static | onParserMakeImageParams (Title $title, $file, array &$params, Parser $parser) |
ParserMakeImageParams hook handler, saves extended information about images used on page. | |
Private Member Functions | |
calcWidth (array &$params, File $file) | |
Estimates image size as displayed if not explicitly provided. | |
processFile (Parser $parser, $file, $handlerParams) | |
processThisTitle (Title $title) | |
Returns true if data for this title should be saved. | |
Handler for the "ParserMakeImageParams" and "AfterParserFetchFileAndTitle" hooks.
Definition at line 17 of file ParserFileProcessingHookHandlers.php.
|
private |
Estimates image size as displayed if not explicitly provided.
We don't follow the core size calculation algorithm precisely because it's not required and editor's intentions are more important than the precise number.
array[] | &$params | |
File | $file |
Definition at line 138 of file ParserFileProcessingHookHandlers.php.
References $file, $wgDefaultUserOptions, and $wgThumbLimits.
Referenced by PageImages\Hooks\ParserFileProcessingHookHandlers\processFile().
PageImages\Hooks\ParserFileProcessingHookHandlers::doAfterParserFetchFileAndTitle | ( | Parser | $parser, |
ImageGalleryBase | $gallery ) |
Parser | $parser | Parser that is parsing the gallery |
ImageGalleryBase | $gallery | Object representing the gallery being created |
Definition at line 71 of file ParserFileProcessingHookHandlers.php.
References ImageGalleryBase\getImages(), and PageImages\Hooks\ParserFileProcessingHookHandlers\processFile().
PageImages\Hooks\ParserFileProcessingHookHandlers::doParserMakeImageParams | ( | Title | $title, |
$file, | |||
array & | $params, | ||
Parser | $parser ) |
Title | $title | The title of the image |
File | bool | $file | The file name of the image |
array[] | &$params | The parameters used to generate the image |
Parser | $parser | Parser that called the hook |
Definition at line 58 of file ParserFileProcessingHookHandlers.php.
References $file, and PageImages\Hooks\ParserFileProcessingHookHandlers\processFile().
|
static |
AfterParserFetchFileAndTitle hook handler, saves information about gallery images.
Parser | $parser | Parser that is parsing the gallery |
ImageGalleryBase | $gallery | Object representing the gallery being created |
Definition at line 45 of file ParserFileProcessingHookHandlers.php.
|
static |
ParserMakeImageParams hook handler, saves extended information about images used on page.
Title | $title | The title of the image |
File | bool | $file | The file name of the image |
array[] | &$params | The parameters used to generate the image |
Parser | $parser | Parser that is parsing this image |
Definition at line 29 of file ParserFileProcessingHookHandlers.php.
|
private |
Definition at line 82 of file ParserFileProcessingHookHandlers.php.
References $file, PageImages\Hooks\ParserFileProcessingHookHandlers\calcWidth(), Parser\getOutput(), Parser\getTitle(), PageImages\Hooks\ParserFileProcessingHookHandlers\processThisTitle(), and wfFindFile().
Referenced by PageImages\Hooks\ParserFileProcessingHookHandlers\doAfterParserFetchFileAndTitle(), and PageImages\Hooks\ParserFileProcessingHookHandlers\doParserMakeImageParams().
|
private |
Returns true if data for this title should be saved.
Title | $title |
Definition at line 119 of file ParserFileProcessingHookHandlers.php.
References $title.
Referenced by PageImages\Hooks\ParserFileProcessingHookHandlers\processFile().