1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Manager.php
См. документацию.
1<?php
2declare(strict_types=1);
3
4namespace Bitrix\Landing\Copilot;
5
6use Bitrix\Bitrix24\Feature;
7use Bitrix\Main\Loader;
8use Bitrix\AI\Tuning;
9use Bitrix\Landing;
10
15{
21 public static function isAvailable(): bool
22 {
23 if (Landing\Manager::getZone() === 'cn')
24 {
25 return false;
26 }
27
28 return Loader::includeModule('ai');
29 }
30
31 public static function isFeatureEnabled(): bool
32 {
33 if (Loader::includeModule('bitrix24'))
34 {
35 return Feature::isFeatureEnabled('landing_allow_ai_sites');
36 }
37
38 return true;
39 }
40
45 public static function isActive(): bool
46 {
47 if (!static::isAvailable())
48 {
49 return false;
50 }
51
52 $manager = new Tuning\Manager();
54
55 return $item ? $item->getValue() : false;
56 }
57
58 public static function getLimitSliderCode(): string
59 {
60 return 'limit_copilot';
61 }
62
63 public static function getUnactiveSliderCode(): string
64 {
65 return 'limit_copilot_off';
66 }
67}
const TUNING_CODE_ALLOW_SITE_COPILOT
Определения ai.php:27
static isFeatureEnabled()
Определения Manager.php:31
static getLimitSliderCode()
Определения Manager.php:58
static isAvailable()
Определения Manager.php:21
static getUnactiveSliderCode()
Определения Manager.php:63
static isActive()
Определения Manager.php:45
static getZone()
Определения manager.php:930
Определения ai.php:3
Определения agent.php:3
$manager
Определения office365push.php:39