< Manual:Hooks 
 
      | ApiMakeParserOptions | |
|---|---|
| Available from version 1.28.0 (Gerrit change 295256) allows extensions to adjust the parser options before parsing | |
| Define function: | public static function onApiMakeParserOptions( ParserOptions $options, Title $title, array $params, ApiBase $module, \Wikimedia\ScopedCallback &$reset, bool &$suppressCache ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"ApiMakeParserOptions": "MyExtensionHooks::onApiMakeParserOptions"
	}
}
 | 
| Called from: | File(s): api/ApiExpandTemplates.php, api/ApiParse.php Function(s): execute, makeParserOptions | 
| Interface: | ApiMakeParserOptionsHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ApiMakeParserOptions extensions.
Details
- $options: ParserOptions object
- $title: Title to be parsed
- $params: Array of parameters for the API module
- $module: ApiBase object
- &$reset: Set to a \Wikimedia\ScopedCallback used to reset any hooks after the parse is done.
- &$suppressCache: Set true if cache should be suppressed.
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.