• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/controller/sharingajax.php
  • Класс: BitrixCalendarControllerSharingAjax
  • Вызов: SharingAjax::getConferenceLinkAction
public function getConferenceLinkAction(string $eventLinkHash): array
{
	$result = [];
	$eventLinkHash = Application::getConnection()->getSqlHelper()->forSql($eventLinkHash);

	/** @var SharingLinkEventLink $eventLink */
	$eventLink = $this->getSharingLinkFactory()->getLinkByHash($eventLinkHash);
	if (!$eventLink || !$eventLink->isActive() || $eventLink->getObjectType() !== SharingLinkHelper::EVENT_SHARING_TYPE)
	{
		$this->addError(new Error('Link not found'));

		return $result;
	}

	$conferenceLink = (new SharingSharingConference($eventLink))->getConferenceLink();

	if (!$conferenceLink)
	{
		$this->addError(new Error('Error while creating conference link'));

		return $result;
	}

	$result['conferenceLink'] = $conferenceLink;

	return $result;
}