Debian Codegraph @

includes/Hook/ImageBeforeProduceHTMLHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Hook;
4
5 use File;
6 use MediaWiki\Parser\Parser;
7 use MediaWiki\Title\Title;
8
9 /**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "ImageBeforeProduceHTML" to register handlers implementing this interface.
12 *
13 * @stable to implement
14 * @ingroup Hooks
15 */
16 interface ImageBeforeProduceHTMLHook {
17 /**
18 * This hook is called before producing the HTML created by a wiki image insertion.
19 * You can skip the default logic entirely by returning false, or just modify a few
20 * things using call-by-reference.
21 *
22 * @since 1.35
23 *
24 * @param null $unused Will always be null
25 * @param Title &$title Title object of the image
26 * @param File|false &$file File object, or false if it doesn't exist
27 * @param array &$frameParams Various parameters with special meanings; see documentation in
28 * includes/Linker.php for Linker::makeImageLink
29 * @param array &$handlerParams Various parameters with special meanings; see documentation in
30 * includes/Linker.php for Linker::makeImageLink
31 * @param string|bool &$time Timestamp of file in 'YYYYMMDDHHIISS' string
32 * form, or false for current
33 * @param string &$res Final HTML output, used if you return false
34 * @param Parser $parser
35 * @param string &$query Query params for desc URL
36 * @param string &$widthOption Used by the parser to remember the user preference thumbnailsize
37 * @return bool|void True or no return value to continue or false to skip the default logic
38 */
39 public function onImageBeforeProduceHTML( $unused, &$title, &$file,
40 &$frameParams, &$handlerParams, &$time, &$res, $parser, &$query, &$widthOption
41 );
42 }