MediaWiki  1.34.0
ResourceLoaderSiteModule.php
Go to the documentation of this file.
1 <?php
30 
37  protected function getPages( ResourceLoaderContext $context ) {
38  $pages = [];
39  if ( $this->getConfig()->get( 'UseSiteJs' ) ) {
40  $pages['MediaWiki:Common.js'] = [ 'type' => 'script' ];
41  $pages['MediaWiki:' . ucfirst( $context->getSkin() ) . '.js'] = [ 'type' => 'script' ];
42  }
43  return $pages;
44  }
45 
50  public function getDependencies( ResourceLoaderContext $context = null ) {
51  return [ 'site.styles' ];
52  }
53 }
ResourceLoaderContext
Context object that contains information about the state of a specific ResourceLoader web request.
Definition: ResourceLoaderContext.php:33
ResourceLoaderWikiModule
Abstraction for ResourceLoader modules which pull from wiki pages.
Definition: ResourceLoaderWikiModule.php:53
ResourceLoaderSiteModule
Module for site customizations.
Definition: ResourceLoaderSiteModule.php:29
ResourceLoaderSiteModule\getDependencies
getDependencies(ResourceLoaderContext $context=null)
Definition: ResourceLoaderSiteModule.php:50
$context
$context
Definition: load.php:45
ResourceLoaderModule\getConfig
getConfig()
Definition: ResourceLoaderModule.php:200
ResourceLoaderSiteModule\getPages
getPages(ResourceLoaderContext $context)
Get list of pages used by this module.
Definition: ResourceLoaderSiteModule.php:37