function LanguageMapper::__construct
Same name and namespace in other branches
- 11.x core/modules/ckeditor5/src/LanguageMapper.php \Drupal\ckeditor5\LanguageMapper::__construct()
File
-
core/
modules/ ckeditor5/ src/ LanguageMapper.php, line 28
Class
- LanguageMapper
- Manages language mappings and discovery for ckeditor translations.
Namespace
Drupal\ckeditor5Code
public function __construct(#[Autowire('@cache.discovery')] CacheBackendInterface $persistent_cache, #[Autowire('@cache.memory')] CacheBackendInterface $memory_cache, protected ModuleHandlerInterface $moduleHandler, ?ConfigFactoryInterface $config_factory = NULL) {
$this->cache = new BackendChain();
$this->cache
->appendBackend($memory_cache);
$this->cache
->appendBackend($persistent_cache);
if (!$config_factory) {
@trigger_error('Calling ' . __METHOD__ . '() without the $config_factory argument is deprecated in drupal:11.4.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3566774', E_USER_DEPRECATED);
$config_factory = \Drupal::configFactory();
}
$this->configFactory = $config_factory;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.