• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/integration/bitrix24manager.php
  • Класс: BitrixCalendarIntegrationBitrix24Manager
  • Вызов: Bitrix24Manager::prepareLicenseInfoHelperScript
static function prepareLicenseInfoHelperScript(array $params)
{
	$script = '';

	if (
		(is_string($params['ID']) && $params['ID'] !== '')
		&& ModuleManager::isModuleInstalled('bitrix24')
		&& Loader::includeModule('bitrix24')
		&& ModuleManager::isModuleInstalled('ui')
		&& Loader::includeModule('ui')
	)
	{
		$script = 'if (top.hasOwnProperty("BX") && top.BX !== null && typeof(top.BX) === "function"'.
			' && top.BX.hasOwnProperty("UI") && top.BX.UI !== null && typeof(top.BX.UI) === "object"'.
			' && top.BX.UI.hasOwnProperty("InfoHelper") && top.BX.UI.InfoHelper !== null'.
			' && typeof(top.BX.UI.InfoHelper) === "object" && top.BX.UI.InfoHelper.hasOwnProperty("show")'.
			' && typeof(top.BX.UI.InfoHelper.show) === "function"){top.BX.UI.InfoHelper.show("'.
			CUtil::JSEscape($params['ID']).'");}';
	}

	return $script;
}