• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sharing/helper.php
  • Класс: BitrixCalendarSharingHelper
  • Вызов: Helper::getBitrix24Link
static function getBitrix24Link(): ?string
{
	if (!MainLoader::includeModule('bitrix24'))
	{
		return null;
	}

	$region = MainApplication::getInstance()->getLicense()->getRegion();
	$abuseLink = AbuseZoneMap::getLink($region);

	$parsedUrl = parse_url($abuseLink);
	$protocol = $parsedUrl['scheme'];
	$host = $parsedUrl['host'];
	$parsedUri = new Uri($protocol . '://' . $host);

	return rtrim($parsedUri->getLocator(), '/');
}