You are here

public function CurrentLanguageContext::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Language/ContextProvider/CurrentLanguageContext.php \Drupal\Core\Language\ContextProvider\CurrentLanguageContext::__construct()
  2. 9 core/lib/Drupal/Core/Language/ContextProvider/CurrentLanguageContext.php \Drupal\Core\Language\ContextProvider\CurrentLanguageContext::__construct()

Constructs a new CurrentLanguageContext.

Parameters

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

File

core/lib/Drupal/Core/Language/ContextProvider/CurrentLanguageContext.php, line 32

Class

CurrentLanguageContext
Sets the current language as a context.

Namespace

Drupal\Core\Language\ContextProvider

Code

public function __construct(LanguageManagerInterface $language_manager) {
  $this->languageManager = $language_manager;
}