MediaWiki  REL1_22
ResourceLoaderSiteModule.php
Go to the documentation of this file.
00001 <?php
00028 class ResourceLoaderSiteModule extends ResourceLoaderWikiModule {
00029 
00030     /* Protected Methods */
00031 
00039     protected function getPages( ResourceLoaderContext $context ) {
00040         global $wgUseSiteJs, $wgUseSiteCss;
00041 
00042         $pages = array();
00043         if ( $wgUseSiteJs ) {
00044             $pages['MediaWiki:Common.js'] = array( 'type' => 'script' );
00045             $pages['MediaWiki:' . ucfirst( $context->getSkin() ) . '.js'] = array( 'type' => 'script' );
00046         }
00047         if ( $wgUseSiteCss ) {
00048             $pages['MediaWiki:Common.css'] = array( 'type' => 'style' );
00049             $pages['MediaWiki:' . ucfirst( $context->getSkin() ) . '.css'] = array( 'type' => 'style' );
00050 
00051         }
00052         $pages['MediaWiki:Print.css'] = array( 'type' => 'style', 'media' => 'print' );
00053         return $pages;
00054     }
00055 
00056     /* Methods */
00057 
00063     public function getGroup() {
00064         return 'site';
00065     }
00066 }