function LocaleSource::__construct
Same name and namespace in other branches
- main core/modules/locale/src/LocaleSource.php \Drupal\locale\LocaleSource::__construct()
File
-
core/
modules/ locale/ src/ LocaleSource.php, line 28
Class
- LocaleSource
- Provides the locale source services.
Namespace
Drupal\localeCode
public function __construct(protected readonly LocaleProjectRepository $localeProjectRepository, protected readonly FileSystemInterface $fileSystem, protected readonly ConfigFactoryInterface $configFactory, protected readonly CurrentImportStorage $currentImportStorage, protected readonly KeyValueFactoryInterface $keyValueFactory, protected readonly TimeInterface $time, protected ?LocaleLanguages $localeLanguages = NULL) {
if ($this->localeLanguages === NULL) {
@trigger_error('Calling ' . __METHOD__ . '() without the $localeLanguages argument is deprecated in drupal:11.5.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/project/drupal/issues/3616293', E_USER_DEPRECATED);
$this->localeLanguages = \Drupal::service(LocaleLanguages::class);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.