30 foreach ($syncSectionMap as $syncSection)
32 if ($syncSection->getSectionConnection()->getVendorSectionId() !==
null)
34 GoogleApiPush::setBlockPush(GoogleApiPush::TYPE_SECTION, $syncSection->getSection()->getId());
36 $events = \CCalendarEvent::getLocalBatchEvent(
37 $syncSection->getSection()->getOwner()->getId(),
38 $syncSection->getSection()->getId(),
39 $this->getSyncTimestamp())
45 $syncSection->getSection()->getOwner()->getId(),
46 $syncSection->getSectionConnection()->getVendorSectionId()
49 $this->updateEventsBatch($syncedEvents);
55 $recurrentEvents = \CCalendarEvent::getLocalBatchRecurrentEvent(
56 $syncSection->getSection()->getOwner()->getId(),
57 $syncSection->getSection()->getId(),
58 $this->getSyncTimestamp())
64 $syncSection->getSection()->getOwner()->getId(),
65 $syncSection->getSectionConnection()->getVendorSectionId()
67 $this->updateEventsBatch($syncedEvents);
73 $instances = \CCalendarEvent::getLocalBatchInstances(
74 $syncSection->getSection()->getOwner()->getId(),
75 $syncSection->getSection()->getId(),
76 $this->getSyncTimestamp())
81 $syncSection->getSection()->getOwner()->getId(),
82 $syncSection->getSectionConnection()->getVendorSectionId()
85 $this->updateEventsBatch($syncedInstances);
90 GoogleApiPush::setUnblockPush(GoogleApiPush::TYPE_SECTION, $syncSection->getSection()->getId());
119 private function updateEventsBatch(array $eventsBatch):
void
121 \CCalendarEvent::updateBatchEventFields($eventsBatch, [
'DAV_XML_ID',
'G_EVENT_ID',
'CAL_DAV_LABEL',
'ORIGINAL_DATE_FROM',
'SYNC_STATUS']);
128 private function getSyncTimestamp():
int