class LanguageCookieFixedNegotiation in Language Cookie 8
Class for identifying language from a selected language.
Plugin annotation
@LanguageNegotiation(
id = \Drupal\language_cookie_test\Plugin\LanguageNegotiation\LanguageCookieFixedNegotiation::METHOD_ID,
weight = 10,
name = @Translation("Test language cookie negotiation"),
description = @Translation("This is a test negotiation for language cookie."),
types = {Drupal\Core\Language\LanguageInterface::TYPE_INTERFACE}
)
Hierarchy
- class \Drupal\language\LanguageNegotiationMethodBase implements LanguageNegotiationMethodInterface
- class \Drupal\language_cookie_test\Plugin\LanguageNegotiation\LanguageCookieFixedNegotiation
Expanded class hierarchy of LanguageCookieFixedNegotiation
2 files declare their use of LanguageCookieFixedNegotiation
- LanguageCookieLanguageSelectionPageTest.php in tests/
src/ Functional/ LanguageCookieLanguageSelectionPageTest.php - LanguageCookieTestBase.php in tests/
src/ Functional/ LanguageCookieTestBase.php
File
- tests/
modules/ language_cookie_test/ src/ Plugin/ LanguageNegotiation/ LanguageCookieFixedNegotiation.php, line 19
Namespace
Drupal\language_cookie_test\Plugin\LanguageNegotiationView source
class LanguageCookieFixedNegotiation extends LanguageNegotiationMethodBase {
/**
* The language negotiation method id.
*/
const METHOD_ID = 'test-language-cookie-fixed-negotiation';
/**
* {@inheritdoc}
*/
public function getLangcode(Request $request = NULL) {
return 'nl';
}
}