function RegionalForm::loadDefaultTimeZone

Same name in other branches
  1. 11.x core/modules/system/src/Form/RegionalForm.php \Drupal\system\Form\RegionalForm::loadDefaultTimeZone()

Prepares the saved timezone.default property to be displayed in the form.

Parameters

string|null $value: The value saved in config.

Return value

string The value of the form element.

File

core/modules/system/src/Form/RegionalForm.php, line 127

Class

RegionalForm
Configure regional settings for this site.

Namespace

Drupal\system\Form

Code

public static function loadDefaultTimeZone(?string $value) : string {
    return $value ?: date_default_timezone_get();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.