LanguageSwitcherInterface.php 635 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Drupal\language;
  3. use Drupal\Core\Url;
  4. use Symfony\Component\HttpFoundation\Request;
  5. /**
  6. * Interface for language switcher classes.
  7. */
  8. interface LanguageSwitcherInterface {
  9. /**
  10. * Returns language switch links.
  11. *
  12. * @param \Symfony\Component\HttpFoundation\Request $request
  13. * The current request.
  14. * @param string $type
  15. * The language type.
  16. * @param \Drupal\Core\Url $url
  17. * The URL the switch links will be relative to.
  18. *
  19. * @return array
  20. * An array of link arrays keyed by language code.
  21. */
  22. public function getLanguageSwitchLinks(Request $request, $type, Url $url);
  23. }