• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/managers/outgoingmanager.php
  • Класс: BitrixCalendarSyncManagersOutgoingManager
  • Вызов: OutgoingManager::deleteSectionConnection
private function deleteSectionConnection(SectionConnection $link): void
{
	global $DB;

	if ($link->getConnection()->getId() && $link->getSection()->getId())
	{
		$DB->Query("
			DELETE FROM b_calendar_event_connection
			WHERE CONNECTION_ID = " . (int)$link->getConnection()->getId() ." 
			AND EVENT_ID IN (SELECT EV.ID FROM b_calendar_event EV
	        WHERE EV.SECTION_ID = " . (int)$link->getSection()->getId() . ");"
		);
	}

	if ($link->getId())
	{
		SectionConnectionTable::delete($link->getId());
	}
}