-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
33 lines (27 loc) · 1 KB
/
bootstrap.php
File metadata and controls
33 lines (27 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
if ( defined( 'MWSTAKE_MEDIAWIKI_COMPONENT_ALERTBANNERS_VERSION' ) ) {
return;
}
define( 'MWSTAKE_MEDIAWIKI_COMPONENT_ALERTBANNERS_VERSION', '2.0.4' );
MWStake\MediaWiki\ComponentLoader\Bootstrapper::getInstance()
->register( 'alertbanners', static function () {
$GLOBALS['mwsgAlertBannersProviderRegistry'] = [];
$GLOBALS['mwsgAlertBannersProviderFactories'] = [
'globalvars-config' => [
'class' => "\\MWStake\\MediaWiki\\Component\\AlertBanners\\AlertProviderFactory\\GlobalVars",
'services' => [ 'ObjectFactory' ]
],
'hook' => [
'class' => "\\MWStake\\MediaWiki\\Component\\AlertBanners\\AlertProviderFactory\\Hook",
'services' => [ 'ObjectFactory', 'HookContainer' ]
]
];
$GLOBALS['wgHooks']['SiteNoticeAfter'][] =
'MWStake\\MediaWiki\\Component\\AlertBanners\\Hook\\SiteNoticeAfter\\AddAlerts::callback';
$GLOBALS['wgResourceModules']['mwstake.component.alertbanners'] = [
'scripts' => [
'resources/mwstake.components.alertbanners.js'
],
'localBasePath' => __DIR__
];
} );