| 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 "ParserMakeImageParams" to register handlers implementing this interface. |
| 12 | * |
| 13 | * @stable to implement |
| 14 | * @ingroup Hooks |
| 15 | */ |
| 16 | interface ParserMakeImageParamsHook { |
| 17 | /** |
| 18 | * This hook is called before the parser generates an image link, use this |
| 19 | * to modify the parameters of the image. |
| 20 | * |
| 21 | * @since 1.35 |
| 22 | * |
| 23 | * @param Title $title Title object representing the file |
| 24 | * @param File $file File object that will be used to create the image |
| 25 | * @param array &$params Two-dimensional array of parameters |
| 26 | * @param Parser $parser Parser object that called the hook |
| 27 | * @return bool|void True or no return value to continue or false to abort |
| 28 | */ |
| 29 | public function onParserMakeImageParams( $title, $file, &$params, $parser ); |
| 30 | } |