You are here

public function LocaleLookup::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/locale/src/LocaleLookup.php \Drupal\locale\LocaleLookup::__construct()
  2. 9 core/modules/locale/src/LocaleLookup.php \Drupal\locale\LocaleLookup::__construct()

Constructs a LocaleLookup object.

Parameters

string $langcode: The language code.

string $context: The string context.

\Drupal\locale\StringStorageInterface $string_storage: The string storage.

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.

\Drupal\Core\Lock\LockBackendInterface $lock: The lock backend.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

Overrides CacheCollector::__construct

File

core/modules/locale/src/LocaleLookup.php, line 94

Class

LocaleLookup
A cache collector to allow for dynamic building of the locale cache.

Namespace

Drupal\locale

Code

public function __construct($langcode, $context, StringStorageInterface $string_storage, CacheBackendInterface $cache, LockBackendInterface $lock, ConfigFactoryInterface $config_factory, LanguageManagerInterface $language_manager, RequestStack $request_stack) {
  $this->langcode = $langcode;
  $this->context = (string) $context;
  $this->stringStorage = $string_storage;
  $this->configFactory = $config_factory;
  $this->languageManager = $language_manager;
  $this->cache = $cache;
  $this->lock = $lock;
  $this->tags = [
    'locale',
  ];
  $this->requestStack = $request_stack;
}