function LanguageTestHooks::languageFallbackCandidatesTestAlter
Implements hook_language_fallback_candidates_OPERATION_alter().
File
-
core/
modules/ language/ tests/ language_test/ src/ Hook/ LanguageTestHooks.php, line 93
Class
- LanguageTestHooks
- Hook implementations for language_test.
Namespace
Drupal\language_test\HookCode
public function languageFallbackCandidatesTestAlter(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.