Manual:Hooks/GalleryGetModes

From mediawiki.org
This page is a translated version of the page Manual:Hooks/GalleryGetModes and the translation is 33% complete.
GalleryGetModes
バージョン 1.22.0 (Gerrit change 67885) から利用可能
Allows extensions to add classes that can render different modes of a gallery.
関数の定義:
public static function onGalleryGetModes( array &$modeArray ) { ... }
フックのアタッチ: extension.json 内:
{
	"Hooks": {
		"GalleryGetModes": "MediaWiki\\Extension\\MyExtension\\Hooks::onGalleryGetModes"
	}
}
呼び出し元: ファイル: gallery/ImageGalleryBase.php
インターフェイス: GalleryGetModesHook.php

フックの設定についての詳細情報は Manual:フック を参照してください。
このフックを使用する拡張機能の例については、Category:GalleryGetModes extensions/ja を参照してください。

詳細

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.