MediaWiki REL1_39
MediaWiki\Hook\GetExtendedMetadataHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Hook\GetExtendedMetadataHook:

Public Member Functions

 onGetExtendedMetadata (&$combinedMeta, $file, $context, $single, &$maxCacheTime)
 Use this hook to get extended file metadata for the API.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "GetExtendedMetadata" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 15 of file GetExtendedMetadataHook.php.

Member Function Documentation

◆ onGetExtendedMetadata()

MediaWiki\Hook\GetExtendedMetadataHook::onGetExtendedMetadata ( & $combinedMeta,
$file,
$context,
$single,
& $maxCacheTime )

Use this hook to get extended file metadata for the API.

Since
1.35
Parameters
array&$combinedMetaArray of the form: 'MetadataPropName' => [ value' => prop value, 'source' => 'name of hook' ]
File$fileFile in question
IContextSource$contextRequestContext (including language to use)
bool$singleOnly extract the current language; if false, the prop value should be in the metadata multi-language array format: https://mediawiki.org/wiki/Manual:File_metadata_handling#Multi-language_array_format
int&$maxCacheTimeHow long the results can be cached
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: