function LanguageNegotiator::__construct
Same name in other branches
- 9 core/modules/language/src/LanguageNegotiator.php \Drupal\language\LanguageNegotiator::__construct()
- 8.9.x core/modules/language/src/LanguageNegotiator.php \Drupal\language\LanguageNegotiator::__construct()
- 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 90
Class
- LanguageNegotiator
- Class responsible for performing language negotiation.
Namespace
Drupal\languageCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.