function language_access_language_negotiation_info_alter in Language access 8
Implements hook_language_negotiation_info_alter().
Replace the language-browser negotiation with our own plugin that checks th access to the languages.
See also
\Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationBrowser
\Drupal\language_access\Plugin\LanguageNegotiation\LanguageAccessNegotiationBrowser
File
- ./
language_access.module, line 137 - Provide access permissions by language.
Code
function language_access_language_negotiation_info_alter(array &$negotiation_info) {
if (isset($negotiation_info['language-browser'])) {
$negotiation_info['language-browser']['class'] = LanguageAccessNegotiationBrowser::class;
}
}