language_test.module
Same filename in other branches
File
-
core/
modules/ language/ tests/ language_test/ language_test.module
View source
<?php
/**
* @file
* Mock module for language layer tests.
*/
declare (strict_types=1);
/**
* Store the last negotiated languages.
*/
function language_test_store_language_negotiation() {
$last = [];
foreach (\Drupal::languageManager()->getDefinedLanguageTypes() as $type) {
$last[$type] = \Drupal::languageManager()->getCurrentLanguage($type)
->getId();
}
\Drupal::keyValue('language_test')->set('language_negotiation_last', $last);
}
Functions
Title | Deprecated | Summary |
---|---|---|
language_test_store_language_negotiation | Store the last negotiated languages. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.