function LanguageConfigFactoryOverride::__construct

Same name in other branches
  1. 9 core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::__construct()
  2. 8.9.x core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::__construct()
  3. 10 core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::__construct()

Constructs the LanguageConfigFactoryOverride object.

Parameters

\Drupal\Core\Config\StorageInterface $storage: The configuration storage engine.

\Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher: An event dispatcher instance to use for configuration events.

\Drupal\Core\Config\TypedConfigManagerInterface $typed_config: The typed configuration manager.

\Drupal\Core\Language\LanguageDefault $default_language: The default language.

File

core/modules/language/src/Config/LanguageConfigFactoryOverride.php, line 74

Class

LanguageConfigFactoryOverride
Provides language overrides for the configuration factory.

Namespace

Drupal\language\Config

Code

public function __construct(StorageInterface $storage, EventDispatcherInterface $event_dispatcher, TypedConfigManagerInterface $typed_config, LanguageDefault $default_language) {
    $this->baseStorage = $storage;
    $this->eventDispatcher = $event_dispatcher;
    $this->typedConfigManager = $typed_config;
    // Prior to negotiation the override language should be the default
    // language.
    $this->language = $default_language->get();
}

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