Manual:Hooks/GalleryGetModes/pl

This page is a translated version of the page Manual:Hooks/GalleryGetModes and the translation is 17% complete.
GalleryGetModes
Dostępne od wersji version 1.22.0 (Gerrit change 67885)
Allows extensions to add classes that can render different modes of a gallery.
Zdefiniuj funkcję:
public static function onGalleryGetModes( array &$modeArray ) { ... }
Dołącz hak: W extension.json:
{
	"Hooks": {
		"GalleryGetModes": "MediaWiki\\Extension\\MyExtension\\Hooks::onGalleryGetModes"
	}
}
Called from: Plik(i): gallery/ImageGalleryBase.php
Interface: GalleryGetModesHook.php

For more information about attaching hooks, see Podręcznik:Haki .
For examples of extensions using this hook, see Category:GalleryGetModes extensions/pl.

Szczegóły

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.