|
@@ 238-251 (lines=14) @@
|
| 235 |
|
* @param ResourceLoaderContext $context |
| 236 |
|
* @return array Array of URLs |
| 237 |
|
*/ |
| 238 |
|
public function getScriptURLsForDebug( ResourceLoaderContext $context ) { |
| 239 |
|
$resourceLoader = $context->getResourceLoader(); |
| 240 |
|
$derivative = new DerivativeResourceLoaderContext( $context ); |
| 241 |
|
$derivative->setModules( [ $this->getName() ] ); |
| 242 |
|
$derivative->setOnly( 'scripts' ); |
| 243 |
|
$derivative->setDebug( true ); |
| 244 |
|
|
| 245 |
|
$url = $resourceLoader->createLoaderURL( |
| 246 |
|
$this->getSource(), |
| 247 |
|
$derivative |
| 248 |
|
); |
| 249 |
|
|
| 250 |
|
return [ $url ]; |
| 251 |
|
} |
| 252 |
|
|
| 253 |
|
/** |
| 254 |
|
* Whether this module supports URL loading. If this function returns false, |
|
@@ 285-298 (lines=14) @@
|
| 282 |
|
* @param ResourceLoaderContext $context |
| 283 |
|
* @return array [ mediaType => [ URL1, URL2, ... ], ... ] |
| 284 |
|
*/ |
| 285 |
|
public function getStyleURLsForDebug( ResourceLoaderContext $context ) { |
| 286 |
|
$resourceLoader = $context->getResourceLoader(); |
| 287 |
|
$derivative = new DerivativeResourceLoaderContext( $context ); |
| 288 |
|
$derivative->setModules( [ $this->getName() ] ); |
| 289 |
|
$derivative->setOnly( 'styles' ); |
| 290 |
|
$derivative->setDebug( true ); |
| 291 |
|
|
| 292 |
|
$url = $resourceLoader->createLoaderURL( |
| 293 |
|
$this->getSource(), |
| 294 |
|
$derivative |
| 295 |
|
); |
| 296 |
|
|
| 297 |
|
return [ 'all' => [ $url ] ]; |
| 298 |
|
} |
| 299 |
|
|
| 300 |
|
/** |
| 301 |
|
* Get the messages needed for this module. |