ম্যানুয়াল:হুক/গ্যালারী মোড পান

From mediawiki.org
This page is a translated version of the page Manual:Hooks/GalleryGetModes and the translation is 67% complete.
GalleryGetModes
Available from version 1.22.0 (Gerrit change 67885)
এক্সটেনশানগুলিকে ক্লাস যুক্ত করতে অনুমতি দেয় যা কোনও গ্যালারির বিভিন্ন মোড উপস্থাপন করতে পারে।
Define function:
public static function onGalleryGetModes( array &$modeArray ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"GalleryGetModes": "MediaWiki\\Extension\\MyExtension\\Hooks::onGalleryGetModes"
	}
}
Called from: File(s): gallery/ImageGalleryBase.php
Interface: GalleryGetModesHook.php

For more information about attaching hooks, see ম্যানুয়াল:হুক .
For examples of extensions using this hook, see Category:GalleryGetModes extensions/bn.

বিস্তারিত

একটি গ্যালারী উপস্থাপন করতে কাস্টম ক্লাস গুলি যোগ করার জন্য একটি এক্সটেনশনের অনুমতি দেয়। মোডের নাম এবং ক্ল্যাসিকে সহযোগী বিন্যাস যুক্ত করুন।

  • &$modeArray - An associative array mapping mode names to classes that implement that mode. It is expected all registered classes are a subclass of ImageGalleryBase.