• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/office365/sectionmanager.php
  • Класс: Bitrix\Calendar\Sync\Office365\SectionManager
  • Вызов: SectionManager::delete
public function delete(Section $section, SectionContext $context): Result
{
	$result = new Result();
	$sectionLink = $context->getSectionConnection();

	$dto = new SectionDto([
		'id' => $sectionLink->getVendorSectionId(),
	]);
	try
	{
		$this->context->getVendorSyncService()->deleteSection($dto);
		$result->setData([
			'sectionConnection' => $sectionLink,
		]);
	}
	catch (Exception $e)
	{
		$result->addError(new Error($e->getMessage()));
	}

	return $result;
}