/** * @return array */ public function AjaxEventList() { $mResult = false; $oAccount = null; $aCalendarIds = @json_decode($this->getParamValue('CalendarIds'), true); $iStart = $this->getParamValue('Start'); $iEnd = $this->getParamValue('End'); $bIsPublic = (bool) $this->getParamValue('IsPublic'); if ($bIsPublic) { $mResult = $this->oApiCalendar->GetPublicEvents($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); }