final class LanguageNegotiationLanguageSelectionPage in Language Selection Page 8.2
Class for identifying language from a language selection page.
Plugin annotation
@LanguageNegotiation(
weight=-4,
name=@Translation("Language Selection Page"),
description=@Translation("Language is set from a language selection page"),
id=Drupal\language_selection_page\Plugin\LanguageNegotiation\LanguageNegotiationLanguageSelectionPage::METHOD_ID,
types={\Drupal\Core\Language\LanguageInterface::TYPE_INTERFACE},
config_route_name="language_selection_page.negotiation_selection_page"
)
Hierarchy
- class \Drupal\language\LanguageNegotiationMethodBase implements LanguageNegotiationMethodInterface
- class \Drupal\language_selection_page\Plugin\LanguageNegotiation\LanguageNegotiationLanguageSelectionPage
Expanded class hierarchy of LanguageNegotiationLanguageSelectionPage
3 files declare their use of LanguageNegotiationLanguageSelectionPage
- LanguageSelectionPageConditionMethodIsValid.php in src/
Plugin/ LanguageSelectionPageCondition/ LanguageSelectionPageConditionMethodIsValid.php - LanguageSelectionPageSubscriber.php in src/
EventSubscriber/ LanguageSelectionPageSubscriber.php - language_selection_page.install in ./
language_selection_page.install
File
- src/
Plugin/ LanguageNegotiation/ LanguageNegotiationLanguageSelectionPage.php, line 22
Namespace
Drupal\language_selection_page\Plugin\LanguageNegotiationView source
final class LanguageNegotiationLanguageSelectionPage extends LanguageNegotiationMethodBase {
/**
* The language negotiation method id.
*/
public const METHOD_ID = 'language-selection-page';
/**
* {@inheritdoc}
*/
public function getLangcode(?Request $request = NULL) {
// Negotiation is always "unsuccessful". We link to the possible language
// versions in the language page itself.
return FALSE;
}
}