public function LocaleTranslation::__construct in Drupal 8
Same name in this branch
- 8 core/modules/locale/src/LocaleTranslation.php \Drupal\locale\LocaleTranslation::__construct()
- 8 core/modules/locale/src/Plugin/QueueWorker/LocaleTranslation.php \Drupal\locale\Plugin\QueueWorker\LocaleTranslation::__construct()
Same name and namespace in other branches
- 9 core/modules/locale/src/LocaleTranslation.php \Drupal\locale\LocaleTranslation::__construct()
- 10 core/modules/locale/src/LocaleTranslation.php \Drupal\locale\LocaleTranslation::__construct()
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 99
Class
- LocaleTranslation
- String translator using the locale module.
Namespace
Drupal\localeCode
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;
}