You are here

public function LanguageNegotiator::__construct in Drupal 9

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

Constructs a new LanguageNegotiator object.

Parameters

\Drupal\language\ConfigurableLanguageManagerInterface $language_manager: The language manager.

\Drupal\Component\Plugin\PluginManagerInterface $negotiator_manager: The language negotiation methods plugin manager

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

\Drupal\Core\Site\Settings $settings: The settings instance.

\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack service.

File

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

Class

LanguageNegotiator
Class responsible for performing language negotiation.

Namespace

Drupal\language

Code

public function __construct(ConfigurableLanguageManagerInterface $language_manager, PluginManagerInterface $negotiator_manager, ConfigFactoryInterface $config_factory, Settings $settings, RequestStack $requestStack) {
  $this->languageManager = $language_manager;
  $this->negotiatorManager = $negotiator_manager;
  $this->configFactory = $config_factory;
  $this->settings = $settings;
  $this->requestStack = $requestStack;
}