function language_test_language_fallback_candidates_test_alter
Same name in other branches
- 9 core/modules/language/tests/language_test/language_test.module \language_test_language_fallback_candidates_test_alter()
- 10 core/modules/language/tests/language_test/language_test.module \language_test_language_fallback_candidates_test_alter()
Implements hook_language_fallback_candidates_OPERATION_alter().
File
-
core/
modules/ language/ tests/ language_test/ language_test.module, line 90
Code
function language_test_language_fallback_candidates_test_alter(array &$candidates, array $context) {
if (Drupal::state()->get('language_test.fallback_operation_alter.candidates')) {
$langcode = LanguageInterface::LANGCODE_NOT_APPLICABLE;
$candidates[$langcode] = $langcode;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.