Drupal 8  8.0.2
LanguageRequestSubscriber Class Reference
Inheritance diagram for LanguageRequestSubscriber:

Public Member Functions

 __construct (ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, TranslatorInterface $translation, AccountInterface $current_user)
 
 onKernelRequestLanguage (GetResponseEvent $event)
 

Static Public Member Functions

static getSubscribedEvents ()
 

Protected Attributes

 $languageManager
 
 $negotiator
 
 $translation
 
 $currentUser
 

Detailed Description

Sets the $request property on the language manager.

Constructor & Destructor Documentation

__construct ( ConfigurableLanguageManagerInterface  $language_manager,
LanguageNegotiatorInterface  $negotiator,
TranslatorInterface  $translation,
AccountInterface  $current_user 
)

Constructs a LanguageRequestSubscriber object.

Parameters
\Drupal\language\ConfigurableLanguageManagerInterface$language_managerThe language manager service.
\Drupal\language\LanguageNegotiatorInterfaceThe language negotiator.
\Drupal\Core\StringTranslation\Translator\TranslatorInterface$translation,;The translation service.
\Drupal\Core\Session\AccountInterface$current_userThe current active user.

References Drupal\currentUser(), Drupal\languageManager(), and Drupal\translation().

Here is the call graph for this function:

Member Function Documentation

static getSubscribedEvents ( )
static

Registers the methods in this class that should be listeners.

Returns
array An array of event listener definitions.
onKernelRequestLanguage ( GetResponseEvent  $event)

Sets the request on the language manager.

Parameters
\Symfony\Component\HttpKernel\Event\GetResponseEvent$eventThe Event to process.

References Drupal\currentUser(), Drupal\languageManager(), and Drupal\translation().

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: