SyncEvent::delete

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. SyncEvent
  4. delete
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/mappers/syncevent.php
  • Класс: BitrixCalendarCoreMappersSyncEvent
  • Вызов: SyncEvent::delete
public function delete(SyncEntitiesSyncEvent $syncEvent): SyncEntitiesSyncEvent
{
	try
	{
		$event = $this->eventMapper->delete($syncEvent->getEvent());
		$eventConnection = $syncEvent->getEventConnection();

		if ($eventConnection === null)
		{
			throw new BaseException('you should send eventConnection property');
		}

		$eventConnection->setEvent($event);
		$syncEvent->setEventConnection($this->eventConnectionMapper->delete($eventConnection));
		$syncEvent->setEvent($event);

		return $syncEvent;
	}
	catch (BaseException $exception)
	{
		throw new BaseException($exception->getMessage());
	}
}

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