手册:钩子/GalleryGetModes
Appearance
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.php |
介面: | GalleryGetModesHook.php |
更多有关附加钩子的信息,请参见Manual:Hooks 。
有关使用此钩子的扩展示例,请参见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.