You are here

public function ConfigurableLanguageManager::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::__construct()
  2. 10 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::__construct()

Constructs a new ConfigurableLanguageManager object.

Parameters

\Drupal\Core\Language\LanguageDefault $default_language: The default language service.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory service.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.

\Drupal\language\Config\LanguageConfigFactoryOverrideInterface $config_override: The language configuration override service.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack object.

Overrides LanguageManager::__construct

File

core/modules/language/src/ConfigurableLanguageManager.php, line 120

Class

ConfigurableLanguageManager
Overrides default LanguageManager to provide configured languages.

Namespace

Drupal\language

Code

public function __construct(LanguageDefault $default_language, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, LanguageConfigFactoryOverrideInterface $config_override, RequestStack $request_stack) {
  $this->defaultLanguage = $default_language;
  $this->configFactory = $config_factory;
  $this->moduleHandler = $module_handler;
  $this->configFactoryOverride = $config_override;
  $this->requestStack = $request_stack;
}