You are here

public static function TimeZoneResolver::getSubscribedEvents in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/src/TimeZoneResolver.php \Drupal\system\TimeZoneResolver::getSubscribedEvents()
  2. 9 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() : array {
  $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;
}