2020-03-03 22:50:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Api\Hook;
|
|
|
|
|
|
2024-09-25 16:17:29 +00:00
|
|
|
use MediaWiki\Api\ApiBase;
|
2020-03-16 23:31:05 +00:00
|
|
|
|
2020-03-03 22:50:34 +00:00
|
|
|
/**
|
2020-09-26 13:18:43 +00:00
|
|
|
* This is a hook handler interface, see docs/Hooks.md.
|
|
|
|
|
* Use the hook name "APIHelpModifyOutput" to register handlers implementing this interface.
|
|
|
|
|
*
|
2020-07-13 09:05:49 +00:00
|
|
|
* @stable to implement
|
2020-03-03 22:50:34 +00:00
|
|
|
* @ingroup Hooks
|
|
|
|
|
*/
|
|
|
|
|
interface APIHelpModifyOutputHook {
|
|
|
|
|
/**
|
|
|
|
|
* Use this hook to modify an API module's help output.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.35
|
|
|
|
|
*
|
2020-10-27 17:13:40 +00:00
|
|
|
* @param ApiBase $module
|
2020-03-16 23:31:05 +00:00
|
|
|
* @param string[] &$help Array of HTML strings to be joined for the output
|
|
|
|
|
* @param array $options Array of formatting options passed to ApiHelp::getHelp
|
|
|
|
|
* @param array &$tocData If a TOC is being generated, this array has keys as anchors in
|
2024-02-13 01:04:43 +00:00
|
|
|
* the page and values as for SectionMetadata::fromLegacy().
|
2020-03-03 22:50:34 +00:00
|
|
|
* @return bool|void True or no return value to continue or false to abort
|
|
|
|
|
*/
|
|
|
|
|
public function onAPIHelpModifyOutput( $module, &$help, $options, &$tocData );
|
|
|
|
|
}
|