- Модуль: calendar
- Путь к файлу: ~/bitrix/modules/calendar/lib/sync/icloud/apiservice.php
- Класс: BitrixCalendarSyncIcloudApiService
- Вызов: ApiService::getCalendarPath
public function getCalendarPath($connection, $server): ?string
{
$userId = CCalendar::GetUserId();
$davClient = $this->createDavInstance(
$server['scheme'],
$server['host'],
$server['port'],
$connection['SERVER_USERNAME'],
$connection['SERVER_PASSWORD']
);
$this->apiClient = new ApiClient($davClient, $userId);
$calendarXml = $this->apiClient->propfind(
$server['path'],
[['calendar-home-set', 'urn:ietf:params:xml:ns:caldav']],
null,
0
);
if ($calendarXml)
{
return $this->getXmlStringData(
$calendarXml,
'/response/propstat/prop/calendar-home-set/href'
);
}
return null;
}