function PathProcessorLanguage::__construct
Same name and namespace in other branches
- 10 core/modules/language/src/HttpKernel/PathProcessorLanguage.php \Drupal\language\HttpKernel\PathProcessorLanguage::__construct()
- 11.x core/modules/language/src/HttpKernel/PathProcessorLanguage.php \Drupal\language\HttpKernel\PathProcessorLanguage::__construct()
- 9 core/modules/language/src/HttpKernel/PathProcessorLanguage.php \Drupal\language\HttpKernel\PathProcessorLanguage::__construct()
- 8.9.x core/modules/language/src/HttpKernel/PathProcessorLanguage.php \Drupal\language\HttpKernel\PathProcessorLanguage::__construct()
Constructs a PathProcessorLanguage object.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config: A config factory object for retrieving configuration settings.
\Drupal\language\ConfigurableLanguageManagerInterface $languageManager: The configurable language manager.
\Drupal\language\LanguageNegotiatorInterface $negotiator: The language negotiator.
\Drupal\Core\Session\AccountInterface $current_user: The current active user.
\Drupal\language\EventSubscriber\ConfigSubscriber $configSubscriber: The language configuration event subscriber.
File
-
core/
modules/ language/ src/ HttpKernel/ PathProcessorLanguage.php, line 49
Class
- PathProcessorLanguage
- Processes the inbound path using path alias lookups.
Namespace
Drupal\language\HttpKernelCode
public function __construct(protected ConfigFactoryInterface $config, protected ConfigurableLanguageManagerInterface $languageManager, protected LanguageNegotiatorInterface $negotiator, AccountInterface $current_user, protected ConfigSubscriber $configSubscriber) {
$this->negotiator
->setCurrentUser($current_user);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.