mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
8f5000f346
Bug: T267211 Change-Id: I640ab367cd235ab8da7dd70dbef7ae9076712e84
34 lines
995 B
PHP
34 lines
995 B
PHP
<?php
|
|
|
|
use MediaWiki\Logger\LoggerFactory;
|
|
use MediaWiki\MediaWikiServices;
|
|
use Popups\PopupsContext;
|
|
use Popups\PopupsGadgetsIntegration;
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
return [
|
|
'Popups.Config' => static function ( MediaWikiServices $services ) {
|
|
return $services->getService( 'ConfigFactory' )
|
|
->makeConfig( PopupsContext::EXTENSION_NAME );
|
|
},
|
|
'Popups.GadgetsIntegration' => static function ( MediaWikiServices $services ) {
|
|
return new PopupsGadgetsIntegration(
|
|
$services->getService( 'Popups.Config' ),
|
|
ExtensionRegistry::getInstance()
|
|
);
|
|
},
|
|
'Popups.Logger' => static function ( MediaWikiServices $services ) {
|
|
return LoggerFactory::getInstance( PopupsContext::LOGGER_CHANNEL );
|
|
},
|
|
'Popups.Context' => static function ( MediaWikiServices $services ) {
|
|
return new PopupsContext(
|
|
$services->getService( 'Popups.Config' ),
|
|
ExtensionRegistry::getInstance(),
|
|
$services->getService( 'Popups.GadgetsIntegration' ),
|
|
$services->getUserOptionsLookup()
|
|
);
|
|
}
|
|
];
|