/** * Initialize the static variables */ private function init() { if (self::$format) { return; } $dateFormat = CBTxt::T('UE_DATE_FORMAT', '') != '' ? CBTxt::T('UE_DATE_FORMAT', '') : $this->config->get('date_format', 'm/d/Y'); $timeFormat = CBTxt::T('UE_TIME_FORMAT', '') != '' ? CBTxt::T('UE_TIME_FORMAT', '') : ' ' . $this->config->get('time_format', 'H:i:s'); self::$format = $dateFormat . $timeFormat; self::$utc = new DateTimeZone('UTC'); }
/** * Constructor (Not to be called directly: Use Application::MyUser() or Application::User( (int) $userId ) * @see Application::MyUser() * * @param int $userId * @param CmsUserInterface $cmsUser * @param Config $config */ protected function __construct($userId, CmsUserInterface $cmsUser, Config $config) { $this->id = (int) $userId; $this->cmsUser = $cmsUser; $this->moderatorViewAccessLevel = $config->get('moderator_viewaccesslevel', 3, GetterInterface::INT); }