class LanguageNegotiationTest

Same name in this branch
  1. 10 core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php \Drupal\Tests\language\Unit\process\LanguageNegotiationTest
Same name in other branches
  1. 9 core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php \Drupal\Tests\language\Unit\process\LanguageNegotiationTest
  2. 9 core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php \Drupal\language_test\Plugin\LanguageNegotiation\LanguageNegotiationTest
  3. 8.9.x core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php \Drupal\Tests\language\Unit\process\LanguageNegotiationTest
  4. 8.9.x core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php \Drupal\language_test\Plugin\LanguageNegotiation\LanguageNegotiationTest
  5. 11.x core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php \Drupal\Tests\language\Unit\process\LanguageNegotiationTest
  6. 11.x core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php \Drupal\language_test\Plugin\LanguageNegotiation\LanguageNegotiationTest

Class for identifying language from a selected language.

Hierarchy

  • class \Drupal\language_test\Plugin\LanguageNegotiation\LanguageNegotiationTest extends \Drupal\language\LanguageNegotiationMethodBase

Expanded class hierarchy of LanguageNegotiationTest

File

core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php, line 14

Namespace

Drupal\language_test\Plugin\LanguageNegotiation
View source
class LanguageNegotiationTest extends LanguageNegotiationMethodBase {
    
    /**
     * The language negotiation method id.
     */
    const METHOD_ID = 'test_language_negotiation_method';
    
    /**
     * {@inheritdoc}
     */
    public function getLangcode(?Request $request = NULL) {
        return 'it';
    }

}

Members


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.