Manual:Hooks/PageHistoryBeforeList

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": "MyExtensionHooks::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.


DetailsEdit

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