Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:Hooks/FileTransformed

From mediawiki.org
<Manual:Hooks
FileTransformed
Available fromversion 1.20.0
When a file is transformed and moved into storage.
Define function:
publicstaticfunctiononFileTransformed($file,$thumb,$tmpThumbPath,$thumbPath){...}
Attach hook:Inextension.json:
{"Hooks":{"FileTransformed":"MediaWiki\\Extension\\MyExtension\\Hooks::onFileTransformed"}}
Called from:File(s):File.php
Interface:FileTransformedHook.php

For more information about attaching hooks, seeManual:Hooks.
For examples of extensions using this hook, seeCategory:FileTransformed extensions.


Details

[edit]
  • $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
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Hooks/FileTransformed&oldid=4440987"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp