MediaWiki
REL1_34
ResourceLoaderSiteModule.php
Go to the documentation of this file.
1
<?php
29
class
ResourceLoaderSiteModule
extends
ResourceLoaderWikiModule
{
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
ResourceLoaderModule\getConfig
getConfig()
Definition
ResourceLoaderModule.php:200
ResourceLoaderSiteModule
Module for site customizations.
Definition
ResourceLoaderSiteModule.php:29
ResourceLoaderSiteModule\getPages
getPages(ResourceLoaderContext $context)
Get list of pages used by this module.
Definition
ResourceLoaderSiteModule.php:37
ResourceLoaderSiteModule\getDependencies
getDependencies(ResourceLoaderContext $context=null)
Definition
ResourceLoaderSiteModule.php:50
ResourceLoaderWikiModule
Abstraction for ResourceLoader modules which pull from wiki pages.
Definition
ResourceLoaderWikiModule.php:53
$context
$context
Definition
load.php:45
includes
resourceloader
ResourceLoaderSiteModule.php
Generated on Mon Nov 25 2024 16:05:38 for MediaWiki by
1.10.0