Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 4
CRAP
0.00% covered (danger)
0.00%
0 / 6
SlideshowMode
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 4
42
0.00% covered (danger)
0.00%
0 / 6
 __construct
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 2
 setAdditionalOptions
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 2
 perRow
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 getModules
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
<?php
declare( strict_types = 1 );
namespace Wikimedia\Parsoid\Ext\Gallery;
use Wikimedia\Parsoid\DOM\Element;
class SlideshowMode extends TraditionalMode {
    /**
     * Create a SlideshowMode singleton.
     * @param ?string $mode Only used by subclasses.
     */
    protected function __construct( ?string $mode = null ) {
        parent::__construct( $mode ?? 'slideshow' );
    }
    /** @inheritDoc */
    protected function setAdditionalOptions( Opts $opts, Element $ul ): void {
        $ul->setAttribute( 'data-showthumbnails', $opts->showthumbnails ? '1' : '' );
    }
    /** @inheritDoc */
    protected function perRow( Opts $opts, Element $ul ): void {
        /* do nothing */
    }
    /**
     * @return array
     */
    public function getModules(): array {
        return [ 'mediawiki.page.gallery.slideshow' ];
    }
}