EventConnection::convertToObject

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. EventConnection
  4. convertToObject
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/mappers/eventconnection.php
  • Класс: BitrixCalendarCoreMappersEventConnection
  • Вызов: EventConnection::convertToObject
protected function convertToObject($objectEO): ?SyncConnectionEventConnection
{
	if ($objectEO->getEvent() === null || $objectEO->getConnection() === null)
	{
		$objectEO->delete();

		return null;
	}

	$event = $this->prepareEvent($objectEO->getEvent());
	$connection = $this->prepareConnection($objectEO->getConnection());

	return (new SyncConnectionEventConnection())
		->setLastSyncStatus($objectEO->getSyncStatus())
		->setRetryCount($objectEO->getRetryCount())
		->setVersion((int)$objectEO->getVersion())
		->setVendorEventId($objectEO->getVendorEventId())
		->setEntityTag($objectEO->getEntityTag())
		->setRecurrenceId($objectEO->getRecurrenceId())
		->setVendorVersionId($objectEO->getVendorVersionId())
		->setId($objectEO->getId())
		->setData($objectEO->getData())
		->setEvent($event)
		->setConnection($connection)
		;
}

Добавить комментарий