function TimeZoneResolver::getSubscribedEvents

Same name in other branches
  1. 8.9.x core/modules/system/src/TimeZoneResolver.php \Drupal\system\TimeZoneResolver::getSubscribedEvents()
  2. 10 core/modules/system/src/TimeZoneResolver.php \Drupal\system\TimeZoneResolver::getSubscribedEvents()
  3. 11.x core/modules/system/src/TimeZoneResolver.php \Drupal\system\TimeZoneResolver::getSubscribedEvents()

File

core/modules/system/src/TimeZoneResolver.php, line 74

Class

TimeZoneResolver
Event handler that resolves time zone based on site and user configuration.

Namespace

Drupal\system

Code

public static function getSubscribedEvents() {
    $events[ConfigEvents::SAVE][] = [
        'onConfigSave',
        0,
    ];
    // The priority for this must run directly after the authentication
    // subscriber.
    $events[KernelEvents::REQUEST][] = [
        'setDefaultTimeZone',
        299,
    ];
    $events[AccountEvents::SET_USER][] = [
        'setDefaultTimeZone',
    ];
    return $events;
}

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