• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/entities/syncevent.php
  • Класс: BitrixCalendarSyncEntitiesSyncEvent
  • Вызов: SyncEvent::addInstance
public function addInstance(SyncEvent $instance): self
{
	if ($this->instanceMap === null)
	{
		$this->instanceMap = new InstanceMap();
	}

	if (!$this->event->getExcludedDateCollection())
	{
		$this->event->setExcludedDateCollection(new CoreEventPropertiesExcludedDatesCollection());
	}

	$instance->getEvent()->getOriginalDateFrom()
		? $this->updateExcludedDatesMasterEvent($instance->getEvent()->getOriginalDateFrom())
		: $this->updateExcludedDatesMasterEvent($instance->getEvent()->getStart())
	;

	$this->instanceMap->add($instance);

	return $this;
}