class LocaleHelper (View source)

Methods

__construct(string $locales, ContentRepository $contentRepository, UrlGeneratorInterface $urlGenerator, Config $config, string $defaultLocale)

No description

Collection|null
getCurrentLocale(Environment $twig)

No description

Collection
getLocales(Environment $twig, Collection|null $localeCodes = null, bool $all = false)

No description

Collection
localeInfo(string|Collection $localeCode)

No description

Details

__construct(string $locales, ContentRepository $contentRepository, UrlGeneratorInterface $urlGenerator, Config $config, string $defaultLocale)

Parameters

string $locales
ContentRepository $contentRepository
UrlGeneratorInterface $urlGenerator
Config $config
string $defaultLocale

Collection|null getCurrentLocale(Environment $twig)

Parameters

Environment $twig

Return Value

Collection|null

Collection getLocales(Environment $twig, Collection|null $localeCodes = null, bool $all = false)

Parameters

Environment $twig
Collection|null $localeCodes
bool $all

Return Value

Collection

Collection localeInfo(string|Collection $localeCode)

Parameters

string|Collection $localeCode

Return Value

Collection