MediaWiki REL1_35
MediaWiki\Hook\ImageBeforeProduceHTMLHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Hook\ImageBeforeProduceHTMLHook:

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

Stable to implement.

Definition at line 14 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 | bool&$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: