/** * @return array */ public function AjaxCalendarEventList() { $mResult = false; $oAccount = null; $aCalendarIds = @json_decode($this->getParamValue('CalendarIds'), true); $iStart = $this->getParamValue('Start'); $iEnd = $this->getParamValue('End'); $bIsPublic = (bool) $this->getParamValue('IsPublic'); $iTimezoneOffset = $this->getParamValue('TimezoneOffset'); $sTimezone = $this->getParamValue('Timezone'); if ($bIsPublic) { $oPublicAccount = $this->oApiCalendar->getPublicAccount(); $oPublicAccount->User->DefaultTimeZone = $iTimezoneOffset; $oPublicAccount->User->ClientTimeZone = $sTimezone; $mResult = $this->oApiCalendar->getEvents($oPublicAccount, $aCalendarIds, $iStart, $iEnd); } else { $oAccount = $this->getDefaultAccountFromParam(); if (!$this->oApiCapability->isCalendarSupported($oAccount)) { throw new \ProjectCore\Exceptions\ClientException(\ProjectCore\Notifications::CalendarsNotAllowed); } $mResult = $this->oApiCalendar->getEvents($oAccount, $aCalendarIds, $iStart, $iEnd); } return $this->DefaultResponse($oAccount, __FUNCTION__, $mResult); }