• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/google/importmanager.php
  • Класс: BitrixCalendarSyncGoogleImportManager
  • Вызов: ImportManager::handleSuccessBehavior
private function handleSuccessBehavior($result): void
{
	$this->syncSectionConnection->setSyncToken($result['nextSyncToken'] ?? null);
	$this->syncSectionConnection->setPageToken($result['nextPageToken'] ?? null);
	// $this->pageToken = $result['nextPageToken'];
	// $this->etag = $result['etag'];
	$this->syncSectionConnection->setVersionId($result['etag'] ?? null);
	$this->defaultRemind = $result['defaultReminders'][0] ?? null;
	$this->modified = ($result['updated'] ?? null)
		? Date::createDateTimeFromFormat($result['updated'], Helper::DATE_TIME_FORMAT_WITH_MICROSECONDS)
		: new Date()
	;
	// TODO: Remake it: Overdependence from $this->httpClient
	$status = $this->httpClient->getStatus();
	$this->lastSyncStatus = BitrixCalendarSyncDictionary::SYNC_SECTION_ACTION['success'];
}