Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
ParsoidKartographerConfig | n/a |
0 / 0 |
n/a |
0 / 0 |
2 | n/a |
0 / 0 |
|||
getConfig | n/a |
0 / 0 |
n/a |
0 / 0 |
2 |
1 | <?php |
2 | |
3 | namespace Kartographer\Tag; |
4 | |
5 | use MediaWiki\MediaWikiServices; |
6 | use Wikimedia\Parsoid\Ext\ExtensionModule; |
7 | |
8 | /** |
9 | * @license MIT |
10 | */ |
11 | class ParsoidKartographerConfig implements ExtensionModule { |
12 | |
13 | /** |
14 | * @inheritDoc |
15 | * @codeCoverageIgnore |
16 | */ |
17 | public function getConfig(): array { |
18 | $mainConfig = MediaWikiServices::getInstance()->getMainConfig(); |
19 | if ( $mainConfig->get( 'KartographerParsoidSupport' ) ) { |
20 | return [ |
21 | 'name' => 'Kartographer', |
22 | 'tags' => [ |
23 | [ |
24 | 'name' => 'maplink', |
25 | 'handler' => ParsoidMapLink::class, |
26 | 'options' => [ |
27 | 'outputHasCoreMwDomSpecMarkup' => true, |
28 | 'wt2html' => [ |
29 | 'embedsHTMLInAttributes' => true |
30 | ] |
31 | ], |
32 | ], |
33 | [ |
34 | 'name' => 'mapframe', |
35 | 'handler' => ParsoidMapFrame::class, |
36 | 'options' => [ |
37 | 'outputHasCoreMwDomSpecMarkup' => true, |
38 | 'wt2html' => [ |
39 | 'embedsHTMLInAttributes' => true |
40 | ] |
41 | ], |
42 | ] |
43 | ], |
44 | 'domProcessors' => [ ParsoidDomProcessor::class ] |
45 | ]; |
46 | } else { |
47 | return [ |
48 | 'name' => 'Kartographer', |
49 | ]; |
50 | } |
51 | } |
52 | } |