< Manual:Hooks
GetAllBlockActions
Available from version 1.37.0 (Gerrit change 681005)
Add an action that can be blocked via a partial block.
Define function:
public static function onGetAllBlockActions( array &$actions ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"GetAllBlockActions": "MyExtensionHooks::onGetAllBlockActions"
	}
}
Called from: File(s): block/BlockActionInfo.php
Function(s): getAllBlockActions
Interface: GetAllBlockActionsHook.php

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

The action should be added to the $action array. The key should be the name of the action as it appears in the code, and the value should be a unique integer ID.

IDs for extension actions must be 100 or greater and must not conflict with other extensions' IDs. IDs must be documented here in order to ensure no conflicts:

IDExtensionAction name
100Thanksthanks
200ImportDumprequest-import-dump

In the future ID conflicts may instead be handled by MediaWiki (see task T280808).

Details

  • &$actions: array of action names to unique IDs
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.