Manual:Hooks/ProtectionFormAddFormFields

ProtectionFormAddFormFields
Available from version 1.36.0 (Gerrit change 581878)
This hook is called after all protection type form fields are added.
Define function:
public static function onProtectionFormAddFormFields( Article $article, array &$hookFormOptions ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ProtectionFormAddFormFields": "MyExtensionHooks::onProtectionFormAddFormFields"
	}
}
Called from: File(s): ProtectionForm.php
Function(s): buildForm
Interface: ProtectionFormAddFormFieldsHook.php

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


ParametersEdit

  • $article: The title being (un)protected
  • &$hookFormOptions An array to add form fields to

NotesEdit