function PathProcessorLanguage::__construct

Same name in other branches
  1. 9 core/modules/language/src/HttpKernel/PathProcessorLanguage.php \Drupal\language\HttpKernel\PathProcessorLanguage::__construct()
  2. 8.9.x core/modules/language/src/HttpKernel/PathProcessorLanguage.php \Drupal\language\HttpKernel\PathProcessorLanguage::__construct()
  3. 11.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 $language_manager: 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 $config_subscriber: The language configuration event subscriber.

File

core/modules/language/src/HttpKernel/PathProcessorLanguage.php, line 77

Class

PathProcessorLanguage
Processes the inbound path using path alias lookups.

Namespace

Drupal\language\HttpKernel

Code

public function __construct(ConfigFactoryInterface $config, ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, AccountInterface $current_user, ConfigSubscriber $config_subscriber) {
    $this->config = $config;
    $this->languageManager = $language_manager;
    $this->negotiator = $negotiator;
    $this->negotiator
        ->setCurrentUser($current_user);
    $this->configSubscriber = $config_subscriber;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.