mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-27 15:40:15 +00:00
Merge "Remove unused constructor params of MainMenuDirector"
This commit is contained in:
commit
274e32b2e4
|
@ -19,9 +19,6 @@
|
|||
*/
|
||||
namespace MediaWiki\Minerva\Menu\Main;
|
||||
|
||||
use MediaWiki\SpecialPage\SpecialPageFactory;
|
||||
use MessageLocalizer;
|
||||
|
||||
/**
|
||||
* Director responsible for building Main Menu
|
||||
*/
|
||||
|
@ -37,32 +34,13 @@ final class MainMenuDirector {
|
|||
*/
|
||||
private $menuData;
|
||||
|
||||
/**
|
||||
* @var MessageLocalizer
|
||||
*/
|
||||
private $msgLocalizer;
|
||||
|
||||
/**
|
||||
* @var SpecialPageFactory
|
||||
*/
|
||||
private $specialPageFactory;
|
||||
|
||||
/**
|
||||
* Director responsible for Main Menu building
|
||||
*
|
||||
* @param IMainMenuBuilder $builder
|
||||
* @param MessageLocalizer $messageLocalizer Used for translating texts in menu toggle
|
||||
* @param SpecialPageFactory $specialPageFactory Used to check for MobileMenu special page
|
||||
* existence
|
||||
*/
|
||||
public function __construct(
|
||||
IMainMenuBuilder $builder,
|
||||
MessageLocalizer $messageLocalizer,
|
||||
SpecialPageFactory $specialPageFactory
|
||||
) {
|
||||
public function __construct( IMainMenuBuilder $builder ) {
|
||||
$this->builder = $builder;
|
||||
$this->msgLocalizer = $messageLocalizer;
|
||||
$this->specialPageFactory = $specialPageFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -94,7 +72,7 @@ final class MainMenuDirector {
|
|||
$menuData = [
|
||||
'items' => [
|
||||
'groups' => [],
|
||||
'sitelinks' => $this->builder->getSiteLinks()->getEntries()
|
||||
'sitelinks' => $builder->getSiteLinks()->getEntries()
|
||||
]
|
||||
];
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ return [
|
|||
new AdvancedMainMenuBuilder( $showMobileOptions, $showDonateLink, $definitions ) :
|
||||
new DefaultMainMenuBuilder( $showMobileOptions, $showDonateLink, $user, $definitions );
|
||||
|
||||
return new MainMenuDirector( $builder, $context, $services->getSpecialPageFactory() );
|
||||
return new MainMenuDirector( $builder );
|
||||
},
|
||||
'Minerva.Menu.PageActionsDirector' =>
|
||||
static function ( MediaWikiServices $services ): PageActionsMenu\PageActionsDirector {
|
||||
|
|
Loading…
Reference in a new issue