Manual:Hooks/ProtectionForm::buildForm

From Linux Web Expert

ProtectionForm::buildForm
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Called after all protection type fieldsets are made in the form.
<translate> Define function:</translate>
public static function onProtectionForm_buildForm( $article, $output ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"ProtectionForm::buildForm": "MediaWiki\\Extension\\MyExtension\\Hooks::onProtectionFormbuildForm"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> ProtectionForm.php
<translate> Interface:</translate> ProtectionForm__buildFormHook.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:ProtectionForm::buildForm extensions</tvar>.</translate>


Details

  • $article: the title being (un)protected
  • $output: a string of the form HTML so far