2020-03-03 22:50:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Hook;
|
|
|
|
|
|
2020-03-16 23:31:05 +00:00
|
|
|
use Parser;
|
|
|
|
|
use Title;
|
|
|
|
|
|
2020-03-03 22:50:34 +00:00
|
|
|
/**
|
2020-07-13 09:05:49 +00:00
|
|
|
* @stable to implement
|
2020-03-03 22:50:34 +00:00
|
|
|
* @ingroup Hooks
|
|
|
|
|
*/
|
|
|
|
|
interface BeforeParserFetchFileAndTitleHook {
|
|
|
|
|
/**
|
2020-03-16 23:31:05 +00:00
|
|
|
* This hook is called before an image is rendered by Parser.
|
2020-03-03 22:50:34 +00:00
|
|
|
*
|
|
|
|
|
* @since 1.35
|
|
|
|
|
*
|
2020-03-16 23:31:05 +00:00
|
|
|
* @param Parser $parser
|
|
|
|
|
* @param Title $nt Image title
|
|
|
|
|
* @param array &$options Array of options to RepoGroup::findFile. If it contains 'broken'
|
2020-03-03 22:50:34 +00:00
|
|
|
* as a key then the file will appear as a broken thumbnail.
|
2020-03-16 23:31:05 +00:00
|
|
|
* @param string &$descQuery Query string to add to thumbnail URL
|
2020-03-03 22:50:34 +00:00
|
|
|
* @return bool|void True or no return value to continue or false to abort
|
|
|
|
|
*/
|
|
|
|
|
public function onBeforeParserFetchFileAndTitle( $parser, $nt, &$options,
|
|
|
|
|
&$descQuery
|
|
|
|
|
);
|
|
|
|
|
}
|