Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/ui/lib/controller/ |
Upload File : |
<?php namespace Bitrix\UI\Controller; use Bitrix\Bitrix24\License; use Bitrix\Main\Application; use Bitrix\Bitrix24; use Bitrix\Bitrix24\License\Market; use Bitrix\Main\Engine; use Bitrix\Main\Loader; use Bitrix\UI\FeaturePromoter; class InfoHelper extends Engine\Controller { private const POPUP_PROVIDER_TEST_CODE_LIST = []; public function getInitParamsAction( string $type = FeaturePromoter\ProviderType::SLIDER, string $code = '', string $currentUrl = '', ?string $featureId = null ): array { $configuration = new FeaturePromoter\ProviderConfiguration($type, $code, $currentUrl, $featureId); return (new FeaturePromoter\ProviderFactory())->createProvider($configuration)->getRendererParameters(); } public function activateDemoLicenseAction() { $result = [ 'success' => 'N', ]; if (Loader::includeModule('bitrix24') && defined('BX24_HOST_NAME')) { $res = License::getCurrent()->getDemo()->activate(); if ($res->isSuccess()) { $result['success'] = 'Y'; } } return $result; } public function getBuySubscriptionUrlAction() { $action = 'blank'; if (Loader::includeModule('bitrix24')) { $url = Market::getDefaultBuyPath(); } else { $license = Application::getInstance()->getLicense(); $url = $license->getDomainStoreLicense() . '/key_update.php?license_key=' . $license->getHashLicenseKey() . '&tobasket=y&action=b24subscr'; } return [ 'url' => $url, 'action' => $action, ]; } public function activateTrialFeatureAction(string $featureId) { $result = [ 'success' => 'N', ]; if ( Loader::includeModule('bitrix24') && method_exists(Bitrix24\Feature::class, 'trialFeature') ) { $trialable = Bitrix24\Feature::isFeatureTrialable($featureId); if ($trialable) { $result['success'] = Bitrix24\Feature::trialFeature($featureId) ? 'Y' : 'N'; } else { $result['error'] = 'IS_NOT_TRIALABLE'; } } return $result; } public function showLimitSliderAction(): bool { return true; } }