• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/google/builders/buildereventconnectionfromexternalevent.php
  • Класс: BitrixCalendarSyncGoogleBuildersBuilderEventConnectionFromExternalEvent
  • Вызов: BuilderEventConnectionFromExternalEvent::build
public function build(): EventConnection
{
	$id = null;
	if ($eventConnection = $this->syncEvent->getEventConnection())
	{
		$id = $eventConnection->getId();
	}

	return (new EventConnection())
		->setEntityTag($this->externalEvent['etag'] ?? null)
		->setVendorEventId($this->externalEvent['id'] ?? null)
		->setVendorVersionId($this->externalEvent['sequence'] ?? null)
		->setVersion($this->syncEvent->getEvent()->getVersion())
		->setRecurrenceId($this->externalEvent['recurringEventId'] ?? null)
		->setRetryCount(0)
		->setLastSyncStatus('success')
		->setEvent($this->syncEvent->getEvent())
		->setConnection($this->connection)
		->setId($id)
	;
}