title = $title; $this->languagesHelper = $languagesHelper; parent::__construct( $msgLocalizer, $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->title, $this->languagesHelper->doesTitleHasLanguagesOrVariants( $this->title ), $this->getMessageLocalizer(), false, // no additional classes '', 'minerva-page-actions-language-switcher' ) ); } return $group; } }