MediaWiki
1.34.0
|
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. More... | |
static | onParserMakeImageParams (Title $title, $file, array &$params, Parser $parser) |
ParserMakeImageParams hook handler, saves extended information about images used on page. More... | |
Private Member Functions | |
calcWidth (array &$params, File $file) | |
Estimates image size as displayed if not explicitly provided. More... | |
processFile (Parser $parser, $file, $handlerParams) | |
processThisTitle (Title $title) | |
Returns true if data for this title should be saved. More... | |
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 Hooks\ParserFileProcessingHookHandlers\processFile().
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 Hooks\ParserFileProcessingHookHandlers\processFile().
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 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, Hooks\ParserFileProcessingHookHandlers\calcWidth(), Hooks\ParserFileProcessingHookHandlers\processThisTitle(), and wfFindFile().
Referenced by Hooks\ParserFileProcessingHookHandlers\doAfterParserFetchFileAndTitle(), and 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 Hooks\ParserFileProcessingHookHandlers\processFile().