LocaleLookup::__construct

public LocaleLookup::__construct($langcode, $context, StringStorageInterface $string_storage, CacheBackendInterface $cache, LockBackendInterface $lock, ConfigFactoryInterface $config_factory, LanguageManagerInterface $language_manager, RequestStack $request_stack)

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 93

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 = array('locale');
  $this->requestStack = $request_stack;
}
doc_Drupal
2016-10-29 09:24:06
Comments
Leave a Comment

Please login to continue.