Merge "Refactor ContributionsSpecialPage->contributionsSub to support markup overrides"
[mediawiki.git] / includes / api / Hook / ApiMakeParserOptionsHook.php
blobb4b4ccd5faa0dd34ebfbd7c763a243fdc035ad59
1 <?php
3 namespace MediaWiki\Api\Hook;
5 use MediaWiki\Api\ApiBase;
6 use MediaWiki\Parser\ParserOptions;
7 use MediaWiki\Title\Title;
8 use Wikimedia\ScopedCallback;
10 /**
11 * This is a hook handler interface, see docs/Hooks.md.
12 * Use the hook name "ApiMakeParserOptions" to register handlers implementing this interface.
14 * @stable to implement
15 * @ingroup Hooks
17 interface ApiMakeParserOptionsHook {
18 /**
19 * This hook is called from ApiParse and ApiExpandTemplates to allow
20 * extensions to adjust the ParserOptions before parsing.
22 * @since 1.35
24 * @param ParserOptions $options
25 * @param Title $title Title to be parsed
26 * @param array $params Parameter array for the API module
27 * @param ApiBase $module API module (which is also a ContextSource)
28 * @param ScopedCallback|null &$reset Set to a ScopedCallback used to reset any hooks after
29 * the parse is done
30 * @param bool &$suppressCache Set true if cache should be suppressed
31 * @return bool|void True or no return value to continue or false to abort
33 public function onApiMakeParserOptions( $options, $title, $params, $module,
34 &$reset, &$suppressCache