Manual:Hooks/ImagePageFindFile

Category:MediaWiki hooks#ImagePageFindFile Category:Hooks added in MediaWiki 1.13.0#ImagePageFindFile
ImagePageFindFile
Available from version 1.13.0
Called when fetching the file associated with an image page.
Define function:
public static function onImagePageFindFile( $page, &$file, &$displayFile ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ImagePageFindFile": "MediaWiki\\Extension\\MyExtension\\Hooks::onImagePageFindFile"
	}
}
Called from: File(s): page/ImagePage.phpCategory:MediaWiki hooks included in ImagePage.php#ImagePageFindFile
Interface: ImagePageFindFileHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ImagePageFindFile extensions.

Details

$page ImagePage object
&$file File object
&$displayFile displayed File object
Category:Hooks added in MediaWiki 1.13.0 Category:MediaWiki hooks Category:MediaWiki hooks included in ImagePage.php