Manual:Hooks/WikiPageFactory

From mediawiki.org
Jump to navigation Jump to search
WikiPageFactory
Available from version 1.28.0
Override WikiPage class used for a title
Define function:
public static function onWikiPageFactory( Title $title, WikiPage &$page ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"WikiPageFactory": "MyExtensionHooks::onWikiPageFactory"
	}
}
Called from:File(s): page/WikiPage.php
Function(s): factory
Interface:WikiPageFactoryHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:WikiPageFactory extensions.