2020-03-03 22:50:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Hook;
|
|
|
|
|
|
2020-03-16 23:31:05 +00:00
|
|
|
use File;
|
|
|
|
|
use Parser;
|
|
|
|
|
use Title;
|
|
|
|
|
|
2020-03-03 22:50:34 +00:00
|
|
|
/**
|
|
|
|
|
* @stable for implementation
|
|
|
|
|
* @ingroup Hooks
|
|
|
|
|
*/
|
|
|
|
|
interface ParserMakeImageParamsHook {
|
|
|
|
|
/**
|
2020-03-16 23:31:05 +00:00
|
|
|
* This hook is called before the parser generates an image link, use this
|
2020-03-03 22:50:34 +00:00
|
|
|
* to modify the parameters of the image.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.35
|
|
|
|
|
*
|
2020-03-16 23:31:05 +00:00
|
|
|
* @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
|
2020-03-03 22:50:34 +00:00
|
|
|
* @return bool|void True or no return value to continue or false to abort
|
|
|
|
|
*/
|
|
|
|
|
public function onParserMakeImageParams( $title, $file, &$params, $parser );
|
|
|
|
|
}
|