Manual:Hooks/GalleryGetModes/ja

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
GalleryGetModes
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 67885)</tvar></translate>
Allows extensions to add classes that can render different modes of a gallery.
<translate> Define function:</translate>
public static function onGalleryGetModes( array &$modeArray ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"GalleryGetModes": "MediaWiki\\Extension\\MyExtension\\Hooks::onGalleryGetModes"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> gallery/ImageGalleryBase.php
<translate> Interface:</translate> GalleryGetModesHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:フック </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:GalleryGetModes extensions/ja</tvar>.</translate>

詳細

Allows an extension to add custom classes to render a gallery with. Add the mode name and the class to the associative array.

  • &$modeArray - An associative array mapping mode names to classes that implement that mode. It is expected all registered classes are a subclass of ImageGalleryBase.