public LocaleTranslation::__construct(StringStorageInterface$storage, CacheBackendInterface$cache, LockBackendInterface$lock, ConfigFactoryInterface$config_factory, LanguageManagerInterface$language_manager, RequestStack$request_stack)
Constructs a translator using a string storage.
Parameters
\Drupal\locale\StringStorageInterface $storage: Storage to use when looking for new translations.
\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.
File
- core/modules/locale/src/LocaleTranslation.php, line 96
Class
- LocaleTranslation
- String translator using the locale module.
Namespace
Drupal\locale
Code
public function __construct(StringStorageInterface $storage, CacheBackendInterface $cache, LockBackendInterface $lock, ConfigFactoryInterface $config_factory, LanguageManagerInterface $language_manager, RequestStack $request_stack) {
$this->storage = $storage;
$this->cache = $cache;
$this->lock = $lock;
$this->configFactory = $config_factory;
$this->languageManager = $language_manager;
$this->requestStack = $request_stack;
}
Please login to continue.