function LanguageTestHooks::languageFallbackCandidatesAlter
Same name and namespace in other branches
- 11.x core/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php \Drupal\language_test\Hook\LanguageTestHooks::languageFallbackCandidatesAlter()
Implements hook_language_fallback_candidates_alter().
Attributes
#[Hook('language_fallback_candidates_alter')]
File
-
core/
modules/ language/ tests/ language_test/ src/ Hook/ LanguageTestHooks.php, line 87
Class
- LanguageTestHooks
- Hook implementations for language_test.
Namespace
Drupal\language_test\HookCode
public function languageFallbackCandidatesAlter(array &$candidates, array $context) : void {
if (\Drupal::state()->get('language_test.fallback_alter.candidates')) {
unset($candidates[LanguageInterface::LANGCODE_NOT_SPECIFIED]);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.