mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-24 07:34:11 +00:00
35462639c3
User::getBoolOption() is deprecated and should be replaced with UserOptionsLookup::getBoolOption() Bug: T277600 Change-Id: I9a2118a6342bd5f145174428dcfb518cba4e439b
49 lines
1.5 KiB
PHP
49 lines
1.5 KiB
PHP
<?php
|
|
|
|
use MediaWiki\Logger\LoggerFactory;
|
|
use MediaWiki\MediaWikiServices;
|
|
use Popups\EventLogging\EventLoggerFactory;
|
|
use Popups\PopupsContext;
|
|
use Popups\PopupsGadgetsIntegration;
|
|
use Popups\UserPreferencesChangeHandler;
|
|
|
|
/**
|
|
* @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.EventLogger' => static function ( MediaWikiServices $services ) {
|
|
$factory = new EventLoggerFactory(
|
|
ExtensionRegistry::getInstance()
|
|
);
|
|
return $factory->get();
|
|
},
|
|
'Popups.UserPreferencesChangeHandler' => static function ( MediaWikiServices $services ) {
|
|
return new UserPreferencesChangeHandler(
|
|
$services->getService( 'Popups.Context' ),
|
|
$services->getUserOptionsLookup()
|
|
);
|
|
},
|
|
'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->getService( 'Popups.EventLogger' ),
|
|
$services->getUserOptionsLookup()
|
|
);
|
|
}
|
|
];
|