UserPreference
class UserPreference (View source)
Constants
| KEY_ROWS_PER_PAGE |
|
| KEY_DEFAULT_TTL |
|
| KEY_SHOW_ZONE_SERIAL |
|
| KEY_SHOW_ZONE_TEMPLATE |
|
| KEY_SHOW_ZONE_RECORD_COUNT |
|
| KEY_RECORD_FORM_POSITION |
|
| KEY_SAVE_BUTTON_POSITION |
|
| KEY_DEFAULT_ZONE_VIEW |
|
| KEY_ZONE_SORT_ORDER |
|
| KEY_SHOW_RECORD_ID |
|
| KEY_SHOW_ADD_RECORD_FORM |
|
| KEY_SHOW_RECORD_EDIT_BUTTON |
|
| KEY_SHOW_RECORD_DELETE_BUTTON |
|
| KEY_DISPLAY_HOSTNAME_ONLY |
|
| KEY_TIMEZONE |
|
| KEY_WIDE_LAYOUT |
|
| VALID_KEYS |
Valid preference keys |
| CHECKBOX_KEYS |
Preferences backed by a checkbox. An unchecked box is absent from the
submitted form, so these resolve to 'false' rather than staying untouched. The key doubles as the form field name. |
Methods
No description
No description
No description
No description
No description
No description
No description
Strict check used when storing the per-user timezone preference.
Permissive check used by UserTimezoneService when reading the global misc.timezone fallback - it must accept the same aliases (GMT, US/Eastern) that PHP's date_default_timezone_set() accepts so admin-configured values continue to work in MFA emails.
Details
__construct(int $id, int $userId, string $preferenceKey, string|null $preferenceValue)
No description
int
getId()
No description
int
getUserId()
No description
string
getPreferenceKey()
No description
string|null
getPreferenceValue()
No description
void
setPreferenceValue(string|null $value)
No description
static bool
isValidKey(string $key)
No description
static bool
isValidTimezone(string $timezone)
Strict check used when storing the per-user timezone preference.
Only canonical IANA identifiers are accepted so the UI selector (built from DateTimeZone::listIdentifiers()) can always round-trip the stored value back into its dropdowns.
static bool
isAcceptableTimezone(string $timezone)
Permissive check used by UserTimezoneService when reading the global misc.timezone fallback - it must accept the same aliases (GMT, US/Eastern) that PHP's date_default_timezone_set() accepts so admin-configured values continue to work in MFA emails.