*/
class PackedImageGallery extends TraditionalImageGallery {
- function __construct( $mode = 'traditional' ) {
- parent::__construct( $mode );
+ function __construct( $mode = 'traditional', IContextSource $context = null ) {
+ parent::__construct( $mode, $context );
// Does not support per row option.
$this->mPerRow = 0;
}
}
// self::SCALE_FACTOR so the js has some room to manipulate sizes.
- return array(
+ return [
'width' => $width * self::SCALE_FACTOR,
'height' => $this->mHeights * self::SCALE_FACTOR,
- );
+ ];
}
protected function getThumbDivWidth( $thumbWidth ) {
}
/**
- * @param MediaTransformOutput|bool $thumb the thumbnail, or false if no
+ * @param MediaTransformOutput|bool $thumb The thumbnail, or false if no
* thumb (which can happen)
* @return float
*/
/**
* Add javascript which auto-justifies the rows by manipulating the image sizes.
* Also ensures that the hover version of this degrades gracefully.
+ * @return array
*/
protected function getModules() {
- return array( 'mediawiki.page.gallery' );
+ return [ 'mediawiki.page.gallery' ];
}
/**
* Do not support per-row on packed. It really doesn't work
* since the images have varying widths.
+ * @param int $num
*/
public function setPerRow( $num ) {
return;