MediaWiki  1.23.2
ResourceLoaderSiteModule.php
Go to the documentation of this file.
1 <?php
29 
30  /* Protected Methods */
31 
39  protected function getPages( ResourceLoaderContext $context ) {
40  global $wgUseSiteJs, $wgUseSiteCss;
41 
42  $pages = array();
43  if ( $wgUseSiteJs ) {
44  $pages['MediaWiki:Common.js'] = array( 'type' => 'script' );
45  $pages['MediaWiki:' . ucfirst( $context->getSkin() ) . '.js'] = array( 'type' => 'script' );
46  }
47  if ( $wgUseSiteCss ) {
48  $pages['MediaWiki:Common.css'] = array( 'type' => 'style' );
49  $pages['MediaWiki:' . ucfirst( $context->getSkin() ) . '.css'] = array( 'type' => 'style' );
50 
51  }
52  $pages['MediaWiki:Print.css'] = array( 'type' => 'style', 'media' => 'print' );
53  return $pages;
54  }
55 
56  /* Methods */
57 
63  public function getGroup() {
64  return 'site';
65  }
66 }
ResourceLoaderContext
Object passed around to modules which contains information about the state of a specific loader reque...
Definition: ResourceLoaderContext.php:29
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
ResourceLoaderWikiModule
Abstraction for resource loader modules which pull from wiki pages.
Definition: ResourceLoaderWikiModule.php:32
ResourceLoaderSiteModule
Module for site customizations.
Definition: ResourceLoaderSiteModule.php:28
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
ResourceLoaderSiteModule\getGroup
getGroup()
Gets group name.
Definition: ResourceLoaderSiteModule.php:63
ResourceLoaderContext\getSkin
getSkin()
Definition: ResourceLoaderContext.php:168
ResourceLoaderSiteModule\getPages
getPages(ResourceLoaderContext $context)
Gets list of pages used by this module.
Definition: ResourceLoaderSiteModule.php:39