LanguageNegotiationSelected
class LanguageNegotiationSelected extends LanguageNegotiationMethodBase (View source)
Class for identifying language from a selected language.
Constants
| METHOD_ID |
The language negotiation method id. |
Properties
| protected LanguageManagerInterface | $languageManager | The language manager. |
from LanguageNegotiationMethodBase |
| protected ConfigFactoryInterface | $config | The configuration factory. |
from LanguageNegotiationMethodBase |
| protected AccountInterface | $currentUser | The current active user. |
from LanguageNegotiationMethodBase |
Methods
setLanguageManager(ConfigurableLanguageManagerInterface $language_manager)
Injects the language manager.
persist(LanguageInterface $language)
Notifies the plugin that the language code it returned has been accepted.
string
getLangcode(Request $request = NULL)
Performs language negotiation.
Details
setLanguageManager(ConfigurableLanguageManagerInterface $language_manager)
Injects the language manager.
setConfig(ConfigFactoryInterface $config)
Injects the configuration factory.
setCurrentUser(AccountInterface $current_user)
Injects the current user.
persist(LanguageInterface $language)
Notifies the plugin that the language code it returned has been accepted.
string
getLangcode(Request $request = NULL)
Performs language negotiation.