context = $context; $this->languagesHelper = $languagesHelper; parent::__construct( $title, $context, $permissions ); } /** * @inheritDoc */ public function getGroup( array $toolbox, array $actions ): Group { $group = parent::getGroup( $toolbox, $actions ); if ( $this->isAllowed( IMinervaPagePermissions::SWITCH_LANGUAGE ) ) { $group->prependEntry( new LanguageSelectorEntry( $this->getTitle(), $this->languagesHelper->doesTitleHasLanguagesOrVariants( $this->context->getOutput(), $this->getTitle() ), $this->getMessageLocalizer(), false, // no additional classes [], 'minerva-page-actions-language-switcher' ) ); } return $group; } }