• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/mappers/syncevent.php
  • Класс: BitrixCalendarCoreMappersSyncEvent
  • Вызов: SyncEvent::getSyncEventWithVendorId
public function getSyncEventWithVendorId(string $vendorId): SyncEntitiesSyncEvent
{
	$eventConnectionDM = EventConnectionTable::query()
		->addFilter('VENDOR_EVENT_ID', $vendorId)
		->setSelect(['*'])
		->exec()
		->fetchObject()
	;

	if ($eventConnectionDM)
	{
		$syncEvent = new SyncEntitiesSyncEvent();
		$eventConnection = (new SyncBuildersBuilderEventConnectionFromDM($eventConnectionDM))->build();
		$syncEvent
			->setEventConnection($eventConnection)
			->setEvent((new EventBuilderFromEntityObject($eventConnectionDM->getEvent()))->build())
		;

		return $syncEvent;
	}

	throw new BaseException('do not get SyncEvent');
}