• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/icloud/vendorsyncservice.php
  • Класс: BitrixCalendarSyncIcloudVendorSyncService
  • Вызов: VendorSyncService::getCalendarServerPath
public function getCalendarServerPath(array $connection): ?string
{
	if (empty($connection['ID']))
	{
		$server = $this->getApiService()->prepareUrl($this->helper::SERVER_PATH);

		$server['path'] = $this->getApiService()->getPrinciples($connection, $server);
		if (!$server['path'])
		{
			return null;
		}

		$calendarPath = $this->getApiService()->getCalendarPath($connection, $server);

		if ($calendarPath)
		{
			return $calendarPath;
		}

		return null;
	}

	return $connection['SERVER_SCHEME']
		. '://'
		. $connection['SERVER_HOST']
		. $connection['SERVER_PATH']
	;
}