Merge "Remove unused constructor params of MainMenuDirector"

This commit is contained in:
jenkins-bot 2023-02-27 23:05:33 +00:00 committed by Gerrit Code Review
commit 274e32b2e4
2 changed files with 3 additions and 25 deletions

View file

@ -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()
]
];

View file

@ -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 {