You are here

function language_test_page_top in Drupal 8

Same name and namespace in other branches
  1. 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(),
    ]));
  }
}