Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LocaleLookup.php

function 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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal