mediawiki-extensions-Discus.../includes/ServiceWiring.php
Bartosz Dziewoński 0024a94ba7 Store permalink data, implement Special:FindComment/GoToComment
Depends-On: I90656cc74bb1cb1f2f3c82ad51cfb164cb8a4a4b
Bug: T296801
Change-Id: I84187b303aa10a242c872088403f808df3d1f940
2022-08-11 01:19:47 +02:00

51 lines
1.6 KiB
PHP

<?php
namespace MediaWiki\Extension\DiscussionTools;
use MediaWiki\MediaWikiServices;
return [
'DiscussionTools.CommentParser' => static function ( MediaWikiServices $services ): CommentParser {
return new CommentParser(
$services->getMainConfig(),
$services->getContentLanguage(),
$services->getLanguageConverterFactory(),
$services->getService( 'DiscussionTools.LanguageData' ),
$services->getTitleParser()
);
},
'DiscussionTools.LanguageData' => static function ( MediaWikiServices $services ): LanguageData {
return new LanguageData(
$services->getMainConfig(),
$services->getContentLanguage(),
$services->getLanguageConverterFactory(),
$services->getSpecialPageFactory()
);
},
'DiscussionTools.SubscriptionStore' => static function ( MediaWikiServices $services ): SubscriptionStore {
return new SubscriptionStore(
$services->getConfigFactory(),
$services->getDBLoadBalancerFactory(),
$services->getReadOnlyMode(),
$services->getUserFactory()
);
},
'DiscussionTools.ThreadItemStore' => static function ( MediaWikiServices $services ): ThreadItemStore {
return new ThreadItemStore(
$services->getConfigFactory(),
$services->getDBLoadBalancerFactory(),
$services->getReadOnlyMode(),
$services->getPageStore(),
$services->getRevisionStore(),
$services->getTitleFormatter(),
$services->getActorStore()
);
},
'DiscussionTools.ThreadItemFormatter' => static function ( MediaWikiServices $services ): ThreadItemFormatter {
return new ThreadItemFormatter(
$services->getTitleFormatter(),
$services->getLinkRenderer()
);
},
];