Debian Codegraph @

vendor/wikimedia/parsoid/src/Ext/Gallery/SlideshowMode.php

raw
1 <?php
2 declare( strict_types = 1 );
3
4 namespace Wikimedia\Parsoid\Ext\Gallery;
5
6 use Wikimedia\Parsoid\DOM\Element;
7
8 class SlideshowMode extends TraditionalMode {
9 /**
10 * Create a SlideshowMode singleton.
11 * @param ?string $mode Only used by subclasses.
12 */
13 protected function __construct( ?string $mode = null ) {
14 parent::__construct( $mode ?? 'slideshow' );
15 }
16
17 /** @inheritDoc */
18 protected function setAdditionalOptions( Opts $opts, Element $ul ): void {
19 $ul->setAttribute( 'data-showthumbnails', $opts->showthumbnails ? '1' : '' );
20 }
21
22 /** @inheritDoc */
23 protected function perRow( Opts $opts, Element $ul ): void {
24 /* do nothing */
25 }
26
27 public function getModules(): array {
28 return [ 'mediawiki.page.gallery.slideshow' ];
29 }
30
31 }