class SiteLocaleSelector (View source)

Methods

string
selectLocale(string $fieldName, Site $site, Locale $selectedLocale = null, array $options = [])

Creates form fields and JavaScript page chooser for choosing a locale.

string
selectLocaleMultiple(string $fieldName, Site $site, array $selectedLocales = [], array $options = [])

Creates form fields and JavaScript page chooser for choosing a locale.

bool
shouldDisplayLocaleCode(array $options, array $locales)

No description

Details

string selectLocale(string $fieldName, Site $site, Locale $selectedLocale = null, array $options = [])

Creates form fields and JavaScript page chooser for choosing a locale.

Parameters

string $fieldName
Site $site
Locale $selectedLocale
array $options

Supported options are: bool $allowNull Set to a non falsy value to allow users to choose "no" locale [default: false] string $noLocaleText The string to represent "no locale" [default: t('No Locale')] bool|string $displayLocaleCode Set to 'auto' to automatically determine it; set to a non falsy value to display the locale ID [default: 'auto']

Return Value

string

string selectLocaleMultiple(string $fieldName, Site $site, array $selectedLocales = [], array $options = [])

Creates form fields and JavaScript page chooser for choosing a locale.

Parameters

string $fieldName
Site $site
array $selectedLocales
array $options

Supported options are: string $noLocaleText The string to represent "no locale" [default: t('No Locale')] bool|string $displayLocaleCode Set to 'auto' to automatically determine it; set to a non falsy value to display the locale ID [default: 'auto']

Return Value

string

private bool shouldDisplayLocaleCode(array $options, array $locales)

No description

Parameters

array $options
array $locales

Return Value

bool