• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/google/startsynchronizationmanager.php
  • Класс: BitrixCalendarSyncGoogleStartSynchronizationManager
  • Вызов: StartSynchronizationManager::start
public function start(): ?Connection
{
	$this->connection = $connection = $this->createConnection($this->mapperFactory->getConnection());
	$this->sendResult(MasterPushHandler::MASTER_STAGE[0]);

	$factory = new Factory($this->connection);
	$exchangeManager = new VendorDataExchangeManager(
		$factory,
		(new SyncSectionFactory())->getSyncSectionMapByFactory($factory)
	);
	$exchangeManager
		->addStatusHandlerList($this->getStatusHandlerList())
		->exchange();

	// TODO: this results must be sent from $exchangeManager,
	// but it looks like it's not happening
	$this->sendResult(MasterPushHandler::MASTER_STAGE[2]);
	$this->sendResult(MasterPushHandler::MASTER_STAGE[3]);

	$this->initSubscription($connection);

	return $connection;
}