/** * @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 \ProjectSeven\Exceptions\ClientException(\ProjectSeven\Notifications::CalendarsNotAllowed); } $mResult = $this->oApiCalendar->GetEvents($oAccount, $aCalendarIds, $iStart, $iEnd); } return $this->DefaultResponse($oAccount, __FUNCTION__, $mResult); }