Manual:Hooks/ApiParseMakeOutputPage

From Linux Web Expert

Revision as of 04:39, 4 March 2021 by imported>Baris6161TURK
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ApiParseMakeOutputPage
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 340768)</tvar></translate>
Called when preparing the OutputPage object for ApiParse. This is mainly intended for calling OutputPage::addContentOverride() or OutputPage::addContentOverrideCallback().
<translate> Define function:</translate>
public static function onApiParseMakeOutputPage( ApiBase $module, OutputPage $output ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"ApiParseMakeOutputPage": "MediaWiki\\Extension\\MyExtension\\Hooks::onApiParseMakeOutputPage"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> api/ApiParse.php
<translate> Function(s):</translate> execute
<translate> Interface:</translate> ApiParseMakeOutputPageHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ApiParseMakeOutputPage extensions</tvar>.</translate>


Details

  • $module: ApiBase (which is also a ContextSource)
  • $output: OutputPage