Drupal 8  8.0.2
LanguageNegotiationMethodBase Class Reference
Inheritance diagram for LanguageNegotiationMethodBase:

Public Member Functions

 setLanguageManager (ConfigurableLanguageManagerInterface $language_manager)
 
 setConfig (ConfigFactoryInterface $config)
 
 setCurrentUser (AccountInterface $current_user)
 
 persist (LanguageInterface $language)
 
- Public Member Functions inherited from LanguageNegotiationMethodInterface
 getLangcode (Request $request=NULL)
 

Protected Attributes

 $languageManager
 
 $config
 
 $currentUser
 

Detailed Description

Base class for language negotiation methods.

Member Function Documentation

persist ( LanguageInterface  $language)

{Notifies the plugin that the language code it returned has been accepted.

Parameters
\Drupal\Core\Language\LanguageInterface$languageThe accepted language.
}

Implements LanguageNegotiationMethodInterface.

setConfig ( ConfigFactoryInterface  $config)

{Injects the configuration factory.

Parameters
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe configuration factory.
}

Implements LanguageNegotiationMethodInterface.

References Drupal\config().

Here is the call graph for this function:

setCurrentUser ( AccountInterface  $current_user)

{Injects the current user.

Parameters
\Drupal\Core\Session\AccountInterface$current_userThe current active user.
}

Implements LanguageNegotiationMethodInterface.

References Drupal\currentUser().

Here is the call graph for this function:

setLanguageManager ( ConfigurableLanguageManagerInterface  $language_manager)

{Injects the language manager.

Parameters
\Drupal\language\ConfigurableLanguageManagerInterface$language_managerThe language manager to be used to retrieve the language list and the already negotiated languages.
}

Implements LanguageNegotiationMethodInterface.

References Drupal\languageManager().

Here is the call graph for this function:

Field Documentation

$currentUser
protected

The current active user.

Returns

The documentation for this class was generated from the following file: