210 && Loader::includeModule(
'bitrix24')
211 && method_exists(
'CBitrix24',
'prepareStubInfo')
214 $title = $params[
'TITLE'] ??
'';
215 $content = $params[
'CONTENT'] ??
'';
217 $replacements = isset($params[
'REPLACEMENTS']) && is_array($params[
'REPLACEMENTS'])
218 ? $params[
'REPLACEMENTS'] : array();
220 if (!empty($replacements))
222 $search = array_keys($replacements);
223 $replace = array_values($replacements);
225 $title = str_replace($search, $replace, $title);
226 $content = str_replace($search, $replace, $content);
229 $licenseAllButtonClass = ($params[
'GLOBAL_SEARCH']?
'ui-btn ui-btn-xs ui-btn-light-border' :
'success');
230 $licenseDemoButtonClass = ($params[
'GLOBAL_SEARCH']?
'ui-btn ui-btn-xs ui-btn-light' :
'');
233 if (isset($params[
'ANALYTICS_LABEL']) && $params[
'ANALYTICS_LABEL'] !=
'')
235 $options[
'ANALYTICS_LABEL'] = $params[
'ANALYTICS_LABEL'];
238 return \CBitrix24::prepareStubInfo(
242 array(
'ID' => \CBitrix24::BUTTON_LICENSE_ALL,
'CLASS_NAME' => $licenseAllButtonClass),
243 array(
'ID' => \CBitrix24::BUTTON_LICENSE_DEMO,
'CLASS_NAME' => $licenseDemoButtonClass),
262 && Loader::includeModule(
'bitrix24')
263 && method_exists(
'CBitrix24',
'initLicenseInfoPopupJS')
266 \CBitrix24::initLicenseInfoPopupJS();
268 $popupID = isset($params[
'ID']) ? \CUtil::JSEscape($params[
'ID']) :
'';
269 $title = isset($params[
'TITLE']) ? \CUtil::JSEscape($params[
'TITLE']) :
'';
271 if(isset($params[
'CONTENT']))
273 $content = \CUtil::JSEscape(
276 \CBitrix24::getLicensePrice(
'tf'),
282 return "if(typeof(B24.licenseInfoPopup) !== 'undefined'){ B24.licenseInfoPopup.show('{$popupID}', '{$title}', '{$content}'); }";