Manual:Hooks/PageHistoryBeforeList
Appearance
| PageHistoryBeforeList | |
|---|---|
| Available from version 1.10.0 When a history page list is about to be constructed. | |
| Define function: | public static function onPageHistoryBeforeList( MediaWiki\Page\Article $article, MediaWiki\Context\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
MediaWiki\Page\Articleinstance, the article that the history is loading for - $context: A
MediaWiki\Context\IContextSourceinstance (introduced in 1.21) (Gerrit change 53603)