function LocaleLookup::__construct
Same name and namespace in other branches
- 10 core/modules/locale/src/LocaleLookup.php \Drupal\locale\LocaleLookup::__construct()
- 11.x core/modules/locale/src/LocaleLookup.php \Drupal\locale\LocaleLookup::__construct()
- 9 core/modules/locale/src/LocaleLookup.php \Drupal\locale\LocaleLookup::__construct()
- 8.9.x 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 $stringStorage: The string storage.
\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.
\Drupal\Core\Lock\LockBackendInterface $lock: The lock backend.
\Drupal\Core\Config\ConfigFactoryInterface $configFactory: The config factory.
\Drupal\Core\Language\LanguageManagerInterface $languageManager: The language manager.
\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack.
Overrides CacheCollector::__construct
File
-
core/
modules/ locale/ src/ LocaleLookup.php, line 45
Class
- LocaleLookup
- A cache collector to allow for dynamic building of the locale cache.
Namespace
Drupal\localeCode
public function __construct(protected $langcode, $context, protected StringStorageInterface $stringStorage, protected CacheBackendInterface $cache, protected LockBackendInterface $lock, protected ConfigFactoryInterface $configFactory, protected LanguageManagerInterface $languageManager, protected RequestStack $requestStack) {
$this->context = (string) $context;
$this->tags = [
'locale',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.