Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
ThreeDThumbnailImage | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
toHtml | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\ThreeD; |
4 | |
5 | use MediaWiki\Html\Html; |
6 | use ThumbnailImage; |
7 | |
8 | /** |
9 | * |
10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License as published by |
12 | * the Free Software Foundation; either version 2 of the License, or |
13 | * (at your option) any later version. |
14 | * |
15 | * This program is distributed in the hope that it will be useful, |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | * GNU General Public License for more details. |
19 | * |
20 | * You should have received a copy of the GNU General Public License along |
21 | * with this program; if not, write to the Free Software Foundation, Inc., |
22 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
23 | * http://www.gnu.org/copyleft/gpl.html |
24 | */ |
25 | |
26 | class ThreeDThumbnailImage extends ThumbnailImage { |
27 | /** |
28 | * @inheritDoc |
29 | */ |
30 | public function toHtml( $options = [] ) { |
31 | return Html::rawElement( |
32 | 'span', |
33 | [ |
34 | 'class' => 'mw-3d-wrapper', |
35 | // Image is part of the content, so this message must be in the content language |
36 | 'data-label' => wfMessage( '3d-badge-text' )->inContentLanguage()->text() |
37 | ], |
38 | parent::toHtml( $options ) |
39 | ); |
40 | } |
41 | } |