Manual:Hooks/UploadForm:initial

From mediawiki.org
Jump to navigation Jump to search
UploadForm:initial
Available from version 1.9.0
Called just before the upload form is generated.
Define function:
public static function onUploadForm_initial( SpecialUpload $uploadFormObj ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UploadForm:initial": "MyExtensionHooks::onUploadForminitial"
	}
}
Called from:File(s): specials/SpecialUpload.php
Interface:UploadForm_initialHook.php

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

Details[edit]

  • $uploadFormObj: current SpecialUpload object