Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 7 |
DataModule | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 7 |
getScript | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 5 |
|||
enableModuleContentVersion | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
<?php | |
/** | |
* ResourceLoader module providing extra data to the client-side. | |
* | |
* @file | |
* @ingroup Extensions | |
*/ | |
namespace Graph; | |
use ResourceLoader; | |
use ResourceLoaderContext; | |
use ResourceLoaderModule; | |
class DataModule extends ResourceLoaderModule { | |
/** | |
* @var string[] | |
*/ | |
protected $targets = [ 'desktop', 'mobile' ]; | |
/** | |
* @inheritDoc | |
*/ | |
public function getScript( ResourceLoaderContext $context ) { | |
$config = $this->getConfig(); | |
return ResourceLoader::makeConfigSetScript( [ | |
'wgGraphAllowedDomains' => $config->get( 'GraphAllowedDomains' ), | |
] ); | |
} | |
/** | |
* @inheritDoc | |
*/ | |
public function enableModuleContentVersion() { | |
return true; | |
} | |
} |