You are here

public function PathProcessorLanguage::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 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;
}