[go: up one dir, main page]

Jump to content

Manual:Hooks/PageHistoryBeforeList

From mediawiki.org
PageHistoryBeforeList
Available from version 1.10.0
When a history page list is about to be constructed.
Define function:
public static function onPageHistoryBeforeList( Page $article, IContextSource $context ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"PageHistoryBeforeList": "MediaWiki\\Extension\\MyExtension\\Hooks::onPageHistoryBeforeList"
	}
}
Called from: File(s): actions/HistoryAction.php
Function(s): onView
Interface: PageHistoryBeforeListHook.php

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


Details

[edit]
  • $article: A Page instance, the article that the history is loading for
  • $context: IContextSource instance (introduced in 1.21) (Gerrit change 53603)