wiki.techinc.nl/includes/Hook/ImageBeforeProduceHTMLHook.php
daniel 2e57447c58 Document hook names in hook interfaces.
Bug: T258665
Change-Id: Ifddbf57f8aa2e3eb0d5845601376cbafa08ed407
2020-09-27 12:03:12 +02:00

43 lines
1.6 KiB
PHP

<?php
namespace MediaWiki\Hook;
use DummyLinker;
use File;
use Parser;
use Title;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "ImageBeforeProduceHTML" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface ImageBeforeProduceHTMLHook {
/**
* This hook is called before producing the HTML created by a wiki image insertion.
* You can skip the default logic entirely by returning false, or just modify a few
* things using call-by-reference.
*
* @since 1.35
*
* @param DummyLinker $linker Formerly a Skin/Linker, now a DummyLinker for b/c
* @param Title &$title Title object of the image
* @param File|bool &$file File object, or false if it doesn't exist
* @param array &$frameParams Various parameters with special meanings; see documentation in
* includes/Linker.php for Linker::makeImageLink
* @param array &$handlerParams Various parameters with special meanings; see documentation in
* includes/Linker.php for Linker::makeImageLink
* @param string|bool &$time Timestamp of file in 'YYYYMMDDHHIISS' string
* form, or false for current
* @param string &$res Final HTML output, used if you return false
* @param Parser $parser
* @param string &$query Query params for desc URL
* @param string &$widthOption Used by the parser to remember the user preference thumbnailsize
* @return bool|void True or no return value to continue or false to skip the default logic
*/
public function onImageBeforeProduceHTML( $linker, &$title, &$file,
&$frameParams, &$handlerParams, &$time, &$res, $parser, &$query, &$widthOption
);
}