Manual:Hooks/MediaWikiPerformAction
MediaWikiPerformAction | |
---|---|
Available from version 1.12.0 Override MediaWiki::performAction(). | |
Define function: | public static function onMediaWikiPerformAction( $output, $article, $title, $user, $request, $wiki ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"MediaWikiPerformAction": "MediaWiki\\Extension\\MyExtension\\Hooks::onMediaWikiPerformAction"
}
}
|
Called from: | File(s): MediaWiki.php |
Interface: | MediaWikiPerformActionHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:MediaWikiPerformAction extensions.
Details
editUse this to do something completely different, after the basic globals have been set up, but before ordinary actions take place.
- $output: $wgOut (OutputPage class)
- $article: $wgArticle (Article class)
- $title: $wgTitle (Title class)
- $user: $wgUser (User class)
- $request: $wgRequest (WebRequest class)
- $wiki: MediaWiki object, added in 1.13
Note: To prevent the standard performAction class from doing anything, return false from this hook.