You are here

public function TimeZoneResolver::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/src/TimeZoneResolver.php \Drupal\system\TimeZoneResolver::__construct()

TimeZoneResolver constructor.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

File

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

Class

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

Namespace

Drupal\system

Code

public function __construct(AccountInterface $current_user, ConfigFactoryInterface $config_factory) {
  $this->configFactory = $config_factory;
  $this->currentUser = $current_user;
}