protected function LanguageSwitcherLinkProcessor::processAlwaysLinkToFrontpage in Language Switcher Extended 8
Links all language switcher items to their corresponding frontpage.
Parameters
array $links: Language switcher links to be processed.
1 call to LanguageSwitcherLinkProcessor::processAlwaysLinkToFrontpage()
- LanguageSwitcherLinkProcessor::process in src/
LanguageSwitcherLinkProcessor.php - Processes the language switcher links.
File
- src/
LanguageSwitcherLinkProcessor.php, line 113
Class
- LanguageSwitcherLinkProcessor
- Processes the Language Switcher links.
Namespace
Drupal\language_switcher_extendedCode
protected function processAlwaysLinkToFrontpage(array &$links) {
foreach ($links as $langcode => $link) {
$links[$langcode]['url'] = new Url('<front>');
}
}