You are here

interface LanguageSwitcherInterface in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/language/src/LanguageSwitcherInterface.php \Drupal\language\LanguageSwitcherInterface
  2. 10 core/modules/language/src/LanguageSwitcherInterface.php \Drupal\language\LanguageSwitcherInterface

Interface for language switcher classes.

Hierarchy

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\language
View 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);

}

Members