*/
use MediaWiki\Interwiki\ClassicInterwikiLookup;
+use MediaWiki\Linker\LinkRendererFactory;
use MediaWiki\MediaWikiServices;
return [
);
},
+ 'LinkRendererFactory' => function( MediaWikiServices $services ) {
+ return new LinkRendererFactory(
+ $services->getTitleFormatter()
+ );
+ },
+
+ 'LinkRenderer' => function( MediaWikiServices $services ) {
+ global $wgUser;
+
+ if ( defined( 'MW_NO_SESSION' ) ) {
+ return $services->getLinkRendererFactory()->create();
+ } else {
+ return $services->getLinkRendererFactory()->createForUser( $wgUser );
+ }
+ },
+
'GenderCache' => function( MediaWikiServices $services ) {
return new GenderCache();
},