• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/managers/outgoingmanager.php
  • Класс: BitrixCalendarSyncManagersOutgoingManager
  • Вызов: OutgoingManager::fetchSections
private function fetchSections(array $exclude = []): Generator
{
	$sectionList = SectionTable::getList([
		'filter' => [
			'=CAL_TYPE' => $this->connection->getOwner()->getType(),
			'OWNER_ID' => $this->connection->getOwner()->getId(),
			'EXTERNAL_TYPE' => ['local', $this->connection->getVendor()->getCode()],
			'!ID' => $exclude
		],
		'select' => ['*'],
	]);

	$mapper = new CoreMappersSection();
	while ($sectionDM = $sectionList->fetchObject())
	{
		$section = $mapper->getByEntityObject($sectionDM);
		yield $section;
	}
}