Edited doc comments for hook interfaces to improve consistency and add type hints. Bug: T246855 Change-Id: I38fa802463cd6f39bf5946dbbeb1b3ebaea604b2
27 lines
725 B
PHP
27 lines
725 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Hook;
|
|
|
|
use File;
|
|
use Parser;
|
|
use Title;
|
|
|
|
/**
|
|
* @stable for implementation
|
|
* @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 );
|
|
}
|