• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/office365/sectionmanager.php
  • Класс: Bitrix\Calendar\Sync\Office365\SectionManager
  • Вызов: SectionManager::getSections
public function getSections($connection): array
{
	$result = array();
	$converter = $this->context->getConverter();
	$sections = $this->context->getVendorSyncService()->getSections();
	foreach ($sections as $sectionDto)
	{
		if ($sectionDto->canShare)
		{
			$result[] = [
				'section' => $converter->convertSection($sectionDto),
				'id' => $sectionDto->id,
				'version' => $sectionDto->changeKey,
				'is_primary' => $sectionDto->isDefaultCalendar,
			];
		}
	}

	return $result;
}