Debian Codegraph @

includes/parser/Hook/ParserModifyImageHTMLHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Hook;
4
5 use File;
6 use MediaWiki\Parser\Parser;
7
8 /**
9 * This is a hook handler interface, see docs/Hooks.md.
10 * Use the hook name "ParserModifyImageHTML" to register handlers implementing this interface.
11 *
12 * @stable to implement
13 * @ingroup Hooks
14 */
15 interface ParserModifyImageHTMLHook {
16 /**
17 * This hook is called for each image added to parser output, with its
18 * associated HTML as returned from Linker::makeImageLink().
19 *
20 * @param Parser $parser
21 * @param File $file
22 * @param array $params An associative array of options that were used to generate the HTML.
23 * Like the one sent to onParserMakeImageParams. The 'handler' element contains handler
24 * options. The 'frame' element contains frame options. In the image gallery case, "frame"
25 * will be missing.
26 * @param string &$html The HTML of the image or image wrapper
27 */
28 public function onParserModifyImageHTML( Parser $parser, File $file,
29 array $params, string &$html ): void;
30 }
31
32 /** @deprecated class alias since 1.41 */
33 class_alias( ParserModifyImageHTMLHook::class, 'MediaWiki\Hook\ParserModifyImageHTML' );