Example #1
0
 /**
  * @return array
  */
 public function AjaxCalendarEventDelete()
 {
     $mResult = false;
     $oAccount = $this->getDefaultAccountFromParam();
     $sCalendarId = $this->getParamValue('calendarId');
     $sId = $this->getParamValue('uid');
     $iAllEvents = (int) $this->getParamValue('allEvents');
     if ($iAllEvents && $iAllEvents === 1) {
         $oEvent = new \CEvent();
         $oEvent->IdCalendar = $sCalendarId;
         $oEvent->Id = $sId;
         $sRecurrenceId = $this->getParamValue('recurrenceId');
         $mResult = $this->oApiCalendar->updateExclusion($oAccount, $oEvent, $sRecurrenceId, true);
     } else {
         $mResult = $this->oApiCalendar->deleteEvent($oAccount, $sCalendarId, $sId);
     }
     return $this->DefaultResponse($oAccount, __FUNCTION__, $mResult);
 }