wiki.techinc.nl/includes/parser/Hook/ParserMakeImageParamsHook.php
Subramanya Sastry e55cc517da Move Parser to Mediawiki\Parser namespace
Bug: T166010
Co-Authored-By: Daimona Eaytoy <daimona.wiki@gmail.com>
Co-Authored-By: James Forrester <jforrester@wikimedia.org>
Co-Authored-By: Subramanya Sastry <ssastry@wikimedia.org>
Change-Id: I79b4e732c45095eedbaa80afa5eb7479b387ed8a
2024-02-16 09:18:38 -05:00

30 lines
906 B
PHP

<?php
namespace MediaWiki\Hook;
use File;
use MediaWiki\Parser\Parser;
use MediaWiki\Title\Title;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "ParserMakeImageParams" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface ParserMakeImageParamsHook {
/**
* This hook is called before the parser generates an image link, use this
* to modify the parameters of the image.
*
* @since 1.35
*
* @param Title $title Title object representing the file
* @param File $file File object that will be used to create the image
* @param array &$params Two-dimensional array of parameters
* @param Parser $parser Parser object that called the hook
* @return bool|void True or no return value to continue or false to abort
*/
public function onParserMakeImageParams( $title, $file, &$params, $parser );
}