MediaWiki REL1_40
MediaWiki\Hook\ImageBeforeProduceHTMLHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onImageBeforeProduceHTML ( $linker, &$title, &$file, &$frameParams, &$handlerParams, &$time, &$res, $parser, &$query, &$widthOption)
 This hook is called before producing the HTML created by a wiki image insertion.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "ImageBeforeProduceHTML" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 17 of file ImageBeforeProduceHTMLHook.php.

Member Function Documentation

◆ onImageBeforeProduceHTML()

MediaWiki\Hook\ImageBeforeProduceHTMLHook::onImageBeforeProduceHTML ( $linker,
& $title,
& $file,
& $frameParams,
& $handlerParams,
& $time,
& $res,
$parser,
& $query,
& $widthOption )

This hook is called before producing the HTML created by a wiki image insertion.

You can skip the default logic entirely by returning false, or just modify a few things using call-by-reference.

Since
1.35
Parameters
DummyLinker$linkerFormerly a Skin/Linker, now a DummyLinker for b/c
Title&$titleTitle object of the image
File | false&$fileFile object, or false if it doesn't exist
array&$frameParamsVarious parameters with special meanings; see documentation in includes/Linker.php for Linker::makeImageLink
array&$handlerParamsVarious parameters with special meanings; see documentation in includes/Linker.php for Linker::makeImageLink
string | bool&$timeTimestamp of file in 'YYYYMMDDHHIISS' string form, or false for current
string&$resFinal HTML output, used if you return false
Parser$parser
string&$queryQuery params for desc URL
string&$widthOptionUsed by the parser to remember the user preference thumbnailsize
Returns
bool|void True or no return value to continue or false to skip the default logic

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: