*/
public function getScript( ResourceLoaderContext $context ) {
$files = $this->getScriptFiles( $context );
- if ( $context->getDebug() && $this->debugRaw ) {
- $urls = array();
- foreach ( $this->getScriptFiles( $context ) as $file ) {
- $urls[] = $this->getRemotePath( $file );
- }
- return $urls;
- }
return $this->readScriptFiles( $files );
}
+
+ public function getScriptURLsForDebug( ResourceLoaderContext $context ) {
+ $urls = array();
+ foreach ( $this->getScriptFiles( $context ) as $file ) {
+ $urls[] = $this->getRemotePath( $file );
+ }
+ return $urls;
+ }
+
+ public function supportsURLLoading() {
+ return $this->debugRaw;
+ }
/**
* Gets loader script.
$this->getStyleFiles( $context ),
$this->getFlip( $context )
);
- if ( !$context->getOnly() && $context->getDebug() && $this->debugRaw ) {
- $urls = array();
- foreach ( $this->getStyleFiles( $context ) as $mediaType => $list ) {
- $urls[$mediaType] = array();
- foreach ( $list as $file ) {
- $urls[$mediaType][] = $this->getRemotePath( $file );
- }
- }
- return $urls;
- }
// Collect referenced files
$this->localFileRefs = array_unique( $this->localFileRefs );
// If the list has been modified since last time we cached it, update the cache
return $styles;
}
+ public function getStyleURLsForDebug( ResourceLoaderContext $context ) {
+ $urls = array();
+ foreach ( $this->getStyleFiles( $context ) as $mediaType => $list ) {
+ $urls[$mediaType] = array();
+ foreach ( $list as $file ) {
+ $urls[$mediaType][] = $this->getRemotePath( $file );
+ }
+ }
+ return $urls;
+ }
+
/**
* Gets list of message keys used by this module.
*