Event::patch

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. Event
  4. patch
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/mappers/event.php
  • Класс: BitrixCalendarCoreMappersEvent
  • Вызов: Event::patch
public function patch(CoreEventEvent $event, array $fields): CoreEventEvent
{
	$eventFields = [
		'EXDATE' => (string)$event->getExcludedDateCollection(),
	];

	$result = EventTable::update(
		$event->getId(),
		array_intersect_key($eventFields, array_flip($fields))
	);

	if ($result->isSuccess())
	{
		return $event;
	}

	throw new CoreBaseBaseException('do not patch event');
}

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