Manual:Hooks/GalleryGetModes/de
Appearance
| GalleryGetModes | |
|---|---|
| Erhältlich ab Version 1.22.0 (Gerrit change 67885) Allows extensions to add classes that can render different modes of a gallery. | |
| Funktion definieren: | public static function onGalleryGetModes( array &$modeArray ) { ... }
|
| Haken anbringen: | In extension.json:
{
"Hooks": {
"GalleryGetModes": "MediaWiki\\Extension\\MyExtension\\Hooks::onGalleryGetModes"
}
}
|
| Angerufen von: | Datei(en): Gallery/ImageGalleryBase.php |
| Interface: | GalleryGetModesHook.php |
For more information about attaching hooks, see Handbuch:Hooks.
For examples of extensions using this hook, see Category:GalleryGetModes extensions/de.
Details
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.