LanguageServiceFactory
Table of Contents
Properties
Methods
- __construct() : mixed
- create() : LanguageService
- Factory method to create a language service object.
- createFromSiteLanguage() : LanguageService
- createFromUserPreferences() : LanguageService
Properties
$locales read-only
protected
Locales
$locales
$localizationFactory read-only
protected
LocalizationFactory
$localizationFactory
$runtimeCache read-only
protected
FrontendInterface
$runtimeCache
Methods
__construct()
public
__construct(Locales $locales, LocalizationFactory $localizationFactory, FrontendInterface $runtimeCache) : mixed
Parameters
- $locales : Locales
- $localizationFactory : LocalizationFactory
- $runtimeCache : FrontendInterface
create()
Factory method to create a language service object.
public
create(Locale|string $locale) : LanguageService
Parameters
- $locale : Locale|string
-
the locale
Return values
LanguageServicecreateFromSiteLanguage()
public
createFromSiteLanguage(SiteLanguage $language) : LanguageService
Parameters
- $language : SiteLanguage
Return values
LanguageServicecreateFromUserPreferences()
public
createFromUserPreferences(AbstractUserAuthentication|null $user) : LanguageService
Parameters
- $user : AbstractUserAuthentication|null