Manual:Hooks/GalleryGetModes/zh

Category:MediaWiki hooks/zh#GalleryGetModes Category:Hooks added in MediaWiki 1.22.0/zh#GalleryGetModes
GalleryGetModes
version 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.phpCategory:MediaWiki hooks included in ImageGalleryBase.php#zh
介面: GalleryGetModesHook.php

更多有关附加钩子的信息,请参见[[Special:MyLanguage/Manual:Hooks|:Category:Pages using Lc zh with unknown or deprecated arguments#zh]]
有关使用此钩子的扩展示例,请参见Category:GalleryGetModes extensions/zh

详情

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.
Category:Hooks added in MediaWiki 1.22.0/zh Category:MediaWiki hooks/zh Category:MediaWiki hooks included in ImageGalleryBase.php Category:Pages using Lc zh with unknown or deprecated arguments