You are here

public function LanguageSwitchLinksAlterEvent::setLinkForLanguage in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/core_event_dispatcher/src/Event/Language/LanguageSwitchLinksAlterEvent.php \Drupal\core_event_dispatcher\Event\Language\LanguageSwitchLinksAlterEvent::setLinkForLanguage()

Set the link for a specific language code.

Parameters

string $langcode: The link language code.

array $link: The link path.

File

modules/core_event_dispatcher/src/Event/Language/LanguageSwitchLinksAlterEvent.php, line 68

Class

LanguageSwitchLinksAlterEvent
Class LanguageSwitchLinksAlterEvent.

Namespace

Drupal\core_event_dispatcher\Event\Language

Code

public function setLinkForLanguage($langcode, array $link) {
  $this->links[$langcode] = $link;
}