- Модуль: calendar
- Путь к файлу: ~/bitrix/modules/calendar/lib/controller/syncajax.php
- Класс: BitrixCalendarControllerSyncAjax
- Вызов: SyncAjax::getOutlookLinkAction
public function getOutlookLinkAction(int $id)
{
$result = '';
$section = SectionTable::query()
->setSelect(['XML_ID', 'CAL_TYPE', 'NAME', 'OWNER_ID'])
->where('ID', $id)
->exec()->fetchObject()
;
if ($section)
{
$result = CCalendarSect::GetOutlookLink([
'ID' => $section->getId(),
'XML_ID' => $section->getXmlId(),
'TYPE' => $section->getCalType(),
'NAME' => $section->getName(),
'PREFIX' => CCalendar::GetOwnerName($section->getCalType(), $section->getOwnerId()),
'LINK_URL' => CCalendar::GetOuterUrl()
]);
}
return ['result' => $result];
}