• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/managers/outgoingmanager.php
  • Класс: BitrixCalendarSyncManagersOutgoingManager
  • Вызов: OutgoingManager::export
public function export(): Result
{
	$mainResult = new Result();
	$resultData = [];

	foreach ($this->fetchSections() as $section)
	{
		$sectionResult = $this->exportSection($section);
		if (!$sectionResult->isSuccess())
		{
			continue;
		}

		/** @var SectionConnection $sectionLink */
		$sectionLink = $sectionResult->getData()['sectionConnection'] ?? null;

		if ($sectionLink)
		{
			foreach ($this->fetchSectionEvents($section) as $event)
			{
				$this->exportEvent($event, $sectionLink);
			}
		}
		else
		{
			throw new ObjectPropertyException('Context object das not have sectionLink information');
		}
	}

	return $mainResult->setData($resultData);
}