Manual:Hooks/GetActionName
From Linux Web Expert
GetActionName | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 708537)</tvar></translate> Use this hook to override the action name depending on request parameters. | |
<translate> Define function:</translate> | public static function onGetActionName( IContextSource $context, string &$action ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"GetActionName": "MediaWiki\\Extension\\MyExtension\\Hooks::onGetActionName"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> actions/ActionFactory.php <translate> Function(s):</translate> getActionName |
<translate> Interface:</translate> | GetActionNameHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:GetActionName extensions</tvar>.</translate>