Merge "Enable pinning for anon main menu when page tools is enabled"

This commit is contained in:
jenkins-bot 2023-03-14 21:12:51 +00:00 committed by Gerrit Code Review
commit 62251d1077

View file

@ -51,18 +51,17 @@ class VectorComponentMainMenu implements VectorComponent {
$this->localizer = $localizer;
$this->isPinned = $featureManager->isFeatureEnabled( Constants::FEATURE_MAIN_MENU_PINNED );
$isPageToolsEnabled = $featureManager->isFeatureEnabled( Constants::FEATURE_PAGE_TOOLS );
if ( $isPageToolsEnabled ) {
$this->pinnableHeader = new VectorComponentPinnableHeader(
$this->localizer,
$this->isPinned,
self::ID,
'main-menu-pinned'
);
}
if ( $user->isRegistered() ) {
$this->optOut = new VectorComponentMainMenuActionOptOut( $skin );
$isPageToolsEnabled = $featureManager->isFeatureEnabled( Constants::FEATURE_PAGE_TOOLS );
if ( $isPageToolsEnabled ) {
$this->pinnableHeader = new VectorComponentPinnableHeader(
$this->localizer,
$this->isPinned,
self::ID,
'main-menu-pinned'
);
}
}
if ( $shouldLanguageAlertBeInSidebar ) {
$this->alert = new VectorComponentMainMenuActionLanguageSwitchAlert( $skin );