Manual:Hooks/UploadCreateFromRequest
Appearance
From mediawiki.org
| UploadCreateFromRequest | |
|---|---|
| Available from version 1.16.0 When UploadBase::createFromRequest has been called | |
| Define function: | public static function onUploadCreateFromRequest( $type, &$className ) { ... } |
| Attach hook: | In extension.json:
{ "Hooks":{ "UploadCreateFromRequest":"MediaWiki\\Extension\\MyExtension\\Hooks::onUploadCreateFromRequest" } } |
| Called from: | File(s): Upload/UploadBase.php |
| Interface: | UploadCreateFromRequestHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:UploadCreateFromRequest extensions.
Details
[edit ]- $type: string: the requested upload type
- &$className: the class name of the Upload instance to be created