interface LanguageSwitcherInterface in Drupal 10
Same name and namespace in other branches
- 8 core/modules/language/src/LanguageSwitcherInterface.php \Drupal\language\LanguageSwitcherInterface
- 9 core/modules/language/src/LanguageSwitcherInterface.php \Drupal\language\LanguageSwitcherInterface
Interface for language switcher classes.
Hierarchy
- interface \Drupal\language\LanguageSwitcherInterface
Expanded class hierarchy of LanguageSwitcherInterface
All classes that implement LanguageSwitcherInterface
3 files declare their use of LanguageSwitcherInterface
- LanguageNegotiationContentEntity.php in core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationContentEntity.php - LanguageNegotiationSession.php in core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationSession.php - LanguageNegotiationUrl.php in core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationUrl.php
File
- core/
modules/ language/ src/ LanguageSwitcherInterface.php, line 11
Namespace
Drupal\languageView source
interface LanguageSwitcherInterface {
/**
* Returns language switch links.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* The current request.
* @param string $type
* The language type.
* @param \Drupal\Core\Url $url
* The URL the switch links will be relative to.
*
* @return array
* An array of link arrays keyed by language code.
*/
public function getLanguageSwitchLinks(Request $request, $type, Url $url);
}