mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 06:13:54 +00:00
572ffdf25a
SkinMinerva cached the ContentHandler object for better performance. In the future the ContentHandler will be also used in the Menu, for better readability, store ContentHandler as Service. MediaWikiServices will initialize service on first access and cache it for future needs. Same applies to SkinUserPageHelper, Bug: T216152 Change-Id: Ia98dc860862360a68556272714669f0c3a13eb1e
14 lines
403 B
PHP
14 lines
403 B
PHP
<?php
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
use MediaWiki\Minerva\SkinUserPageHelper;
|
|
|
|
return [
|
|
'Minerva.ContentHandler' => function ( MediaWikiServices $services ) {
|
|
return ContentHandler::getForTitle( RequestContext::getMain()->getTitle() );
|
|
},
|
|
'Minerva.SkinUserPageHelper' => function ( MediaWikiServices $services ) {
|
|
return new SkinUserPageHelper( RequestContext::getMain()->getTitle() );
|
|
}
|
|
];
|