MediaWiki master
SlideshowImageGallery.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\Gallery;
8
10
16 public function __construct( $mode = 'traditional', ?IContextSource $context = null ) {
17 parent::__construct( $mode, $context );
18 // Does not support per row option.
19 $this->mPerRow = 0;
20 }
21
26 protected function getModules() {
27 return [ 'mediawiki.page.gallery.slideshow' ];
28 }
29
31 public function setAdditionalOptions( $params ) {
32 $this->mAttribs['data-showthumbnails'] = isset( $params['showthumbnails'] );
33 }
34}
35
37class_alias( SlideshowImageGallery::class, 'SlideshowImageGallery' );
A slideshow gallery shows one image at a time with controls to move around.
__construct( $mode='traditional', ?IContextSource $context=null)
Create a new image gallery object.You should not call this directly, but instead use ImageGalleryBase...
getModules()
Add javascript adds interface elements.
setAdditionalOptions( $params)
Allow setting additional options.This is meant to allow extensions to add additional parameters to <g...
Interface for objects which can provide a MediaWiki context on request.