function LanguageTestHooks::languageNegotiationInfoAlter

Implements hook_language_negotiation_info_alter().

Attributes

#[Hook('language_negotiation_info_alter')]

File

core/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php, line 77

Class

LanguageTestHooks
Hook implementations for language_test.

Namespace

Drupal\language_test\Hook

Code

public function languageNegotiationInfoAlter(array &$negotiation_info) : void {
  if (\Drupal::keyValue('language_test')->get('language_negotiation_info_alter')) {
    unset($negotiation_info[LanguageNegotiationUI::METHOD_ID]);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.