MediaWiki fundraising/REL1_35
MediaWiki\Hook\GetExtendedMetadataHook Interface Reference

Stable to implement. 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

Stable to implement.

Definition at line 12 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: