1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
infohelper.php
См. документацию.
1<?php
2
3namespace Bitrix\UI\Controller;
4
5use Bitrix\Bitrix24\License;
6use Bitrix\Main\Application;
7use Bitrix\Bitrix24;
8use Bitrix\Bitrix24\License\Market;
9use Bitrix\Main\Engine;
10use Bitrix\Main\Loader;
11use Bitrix\UI\FeaturePromoter;
12
14{
15 private const POPUP_PROVIDER_TEST_CODE_LIST = [];
16
17 public function getInitParamsAction(
19 string $code = '',
20 string $currentUrl = '',
21 ?string $featureId = null
22 ): array
23 {
24 $configuration = new FeaturePromoter\ProviderConfiguration($type, $code, $currentUrl, $featureId);
25
26 return (new FeaturePromoter\ProviderFactory())->createProvider($configuration)->getRendererParameters();
27 }
28
29 public function activateDemoLicenseAction()
30 {
31 $result = [
32 'success' => 'N',
33 ];
34 if (Loader::includeModule('bitrix24') && defined('BX24_HOST_NAME'))
35 {
36 $res = License::getCurrent()->getDemo()->activate();
37
38 if ($res->isSuccess())
39 {
40 $result['success'] = 'Y';
41 }
42 }
43
44 return $result;
45 }
46
48 {
49 $action = 'blank';
50 if (Loader::includeModule('bitrix24'))
51 {
52 $url = Market::getDefaultBuyPath();
53 }
54 else
55 {
56 $license = Application::getInstance()->getLicense();
57 $url = $license->getDomainStoreLicense() . '/key_update.php?license_key=' . $license->getHashLicenseKey() . '&tobasket=y&action=b24subscr';
58 }
59
60 return [
61 'url' => $url,
62 'action' => $action,
63 ];
64 }
65
66 public function activateTrialFeatureAction(string $featureId)
67 {
68 $result = [
69 'success' => 'N',
70 ];
71
72 if (
73 Loader::includeModule('bitrix24')
74 && method_exists(Bitrix24\Feature::class, 'trialFeature')
75 )
76 {
77 $trialable = Bitrix24\Feature::isFeatureTrialable($featureId);
78
79 if ($trialable)
80 {
81 $result['success'] = Bitrix24\Feature::trialFeature($featureId) ? 'Y' : 'N';
82 }
83 else
84 {
85 $result['error'] = 'IS_NOT_TRIALABLE';
86 }
87 }
88
89 return $result;
90 }
91
92 public function showLimitSliderAction(): bool
93 {
94 return true;
95 }
96}
$type
Определения options.php:106
getInitParamsAction(string $type=FeaturePromoter\ProviderType::SLIDER, string $code='', string $currentUrl='', ?string $featureId=null)
Определения infohelper.php:17
activateDemoLicenseAction()
Определения infohelper.php:29
getBuySubscriptionUrlAction()
Определения infohelper.php:47
activateTrialFeatureAction(string $featureId)
Определения infohelper.php:66
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
if(file_exists(( $_fname=__DIR__ . "/classes/general/update_db_updater.php"))) if(($_fname=getLocalPath("init.php")) !==false) if(( $_fname=getLocalPath("php_interface/init.php", BX_PERSONAL_ROOT)) !==false) if(($_fname=getLocalPath("php_interface/" . SITE_ID . "/init.php", BX_PERSONAL_ROOT)) !==false) if((!(defined("STATISTIC_ONLY") &&STATISTIC_ONLY &&!str_starts_with( $GLOBALS["APPLICATION"]->GetCurPage(), BX_ROOT . "/admin/"))) &&COption::GetOptionString("main", "include_charset", "Y")=="Y" &&LANG_CHARSET !='') if(COption::GetOptionString("main", "set_p3p_header", "Y")=="Y") $license
Определения include.php:158
$action
Определения file_dialog.php:21
$url
Определения iframe.php:7