2017-07-21 17:06:08 +00:00
|
|
|
<?php
|
|
|
|
|
2019-02-01 08:40:34 +00:00
|
|
|
use MediaWiki\Logger\LoggerFactory;
|
2017-07-21 17:06:08 +00:00
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
use Popups\PopupsContext;
|
|
|
|
use Popups\PopupsGadgetsIntegration;
|
|
|
|
|
2019-02-01 08:40:34 +00:00
|
|
|
/**
|
|
|
|
* @codeCoverageIgnore
|
|
|
|
*/
|
2017-07-21 17:06:08 +00:00
|
|
|
return [
|
2021-05-19 17:38:42 +00:00
|
|
|
'Popups.Config' => static function ( MediaWikiServices $services ) {
|
2017-07-21 17:06:08 +00:00
|
|
|
return $services->getService( 'ConfigFactory' )
|
|
|
|
->makeConfig( PopupsContext::EXTENSION_NAME );
|
|
|
|
},
|
2021-05-19 17:38:42 +00:00
|
|
|
'Popups.GadgetsIntegration' => static function ( MediaWikiServices $services ) {
|
2017-07-21 17:06:08 +00:00
|
|
|
return new PopupsGadgetsIntegration(
|
|
|
|
$services->getService( 'Popups.Config' ),
|
|
|
|
ExtensionRegistry::getInstance()
|
|
|
|
);
|
|
|
|
},
|
2021-05-19 17:38:42 +00:00
|
|
|
'Popups.Logger' => static function ( MediaWikiServices $services ) {
|
2017-07-21 17:06:08 +00:00
|
|
|
return LoggerFactory::getInstance( PopupsContext::LOGGER_CHANNEL );
|
|
|
|
},
|
2021-05-19 17:38:42 +00:00
|
|
|
'Popups.Context' => static function ( MediaWikiServices $services ) {
|
2017-07-21 17:06:08 +00:00
|
|
|
return new PopupsContext(
|
|
|
|
$services->getService( 'Popups.Config' ),
|
|
|
|
ExtensionRegistry::getInstance(),
|
|
|
|
$services->getService( 'Popups.GadgetsIntegration' ),
|
2022-11-05 09:25:26 +00:00
|
|
|
$services->getSpecialPageFactory(),
|
2021-06-06 13:07:08 +00:00
|
|
|
$services->getUserOptionsLookup()
|
2017-07-21 17:06:08 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
];
|