You are here

function language_test_page_top in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/language/tests/language_test/language_test.module \language_test_page_top()
  2. 9 core/modules/language/tests/language_test/language_test.module \language_test_page_top()

Implements hook_page_top().

File

core/modules/language/tests/language_test/language_test.module, line 15
Mock module for language layer tests.

Code

function language_test_page_top() {
  if (\Drupal::moduleHandler()
    ->moduleExists('language')) {
    language_test_store_language_negotiation();
    \Drupal::messenger()
      ->addStatus(t('Language negotiation method: @name', [
      '@name' => \Drupal::languageManager()
        ->getNegotiatedLanguageMethod() ?? 'Not defined',
    ]));
  }
}