< Manual:Hooks
FileTransformed | |
---|---|
Available from version 1.20.0 When a file is transformed and moved into storage. | |
Define function: | public static function onFileTransformed( $file, $thumb, $tmpThumbPath, $thumbPath ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"FileTransformed": "MyExtensionHooks::onFileTransformed"
}
}
|
Called from: | File(s): File.php |
Interface: | FileTransformedHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:FileTransformed extensions.
Details
- $file: reference to the File object
- $thumb: the MediaTransformOutput object
- $tmpThumbPath: The temporary file system path of the transformed file
- $thumbPath: The permanent storage path of the transformed file
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.