Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 4
CRAP
0.00% covered (danger)
0.00%
0 / 1
SlideshowMode
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 4
30
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setAdditionalOptions
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 perRow
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getModules
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2declare( strict_types = 1 );
3
4namespace Wikimedia\Parsoid\Ext\Gallery;
5
6use Wikimedia\Parsoid\DOM\Element;
7
8class 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}