LanguageNegotiator::setCurrentUser

public LanguageNegotiator::setCurrentUser(AccountInterface $current_user)

Sets the current active user and resets all language types.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: The current active user.

Overrides LanguageNegotiatorInterface::setCurrentUser

File

core/modules/language/src/LanguageNegotiator.php, line 115

Class

LanguageNegotiator
Class responsible for performing language negotiation.

Namespace

Drupal\language

Code

public function setCurrentUser(AccountInterface $current_user) {
  $this->currentUser = $current_user;
  $this->reset();
}
doc_Drupal
2016-10-29 09:22:53
Comments
Leave a Comment

Please login to continue.