• Модуль: dav
  • Путь к файлу: ~/bitrix/modules/dav/classes/general/calendarhandler.php
  • Класс: CDavCalendarHandler
  • Вызов: CDavCalendarHandler::GetCollectionProperties
public function GetCollectionProperties(CDavResource $resource, $siteId, $account = null, $currentApplication = null, $arPath = null, $options = 0)
	{
		$request = $this->groupdav->GetRequest();
		$currentPrincipal = $request->GetPrincipal();

		$homeUrl = $this->GetHomeCollectionUrl($siteId, $account, $arPath);
		$resource->AddProperty('calendar-home-set', array('href', $request->GetBaseUri().$homeUrl), CDavGroupDav::CALDAV);
		$resource->AddProperty('schedule-outbox-URL', array('href', $request->GetBaseUri().$homeUrl, CDavGroupDav::DAV), CDavGroupDav::CALDAV);

		if ($currentApplication == "calendar")
		{
			$calendarId = $this->GetCalendarId($siteId, $account, $arPath);
			list($iblockId, $sectionId, $subSectionId, $accountType) = $calendarId;
			$isCalendarCollection = (!empty($accountType) && $subSectionId != 0 || empty($accountType) && $sectionId != 0);

			if ($isCalendarCollection)
				$this->GetCalendarProperties($resource, $siteId, $account, $arPath, $options);
			else
				$resource->AddProperty('resourcetype', array(array('collection', '')));
		}
	}