1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
Manager.php
См. документацию.
1
<?php
2
declare(strict_types=1);
3
4
namespace
Bitrix\Landing\Copilot;
5
6
use Bitrix\Bitrix24\Feature;
7
use Bitrix\Main\Loader;
8
use Bitrix\AI\Tuning;
9
use Bitrix\Landing;
10
14
class
Manager
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();
53
$item =
$manager
->getItem(
Landing
\
Connector
\
Ai::TUNING_CODE_ALLOW_SITE_COPILOT
);
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
}
Bitrix\Landing\Assets\Manager
Определения
manager.php:20
Bitrix\Landing\Connector\Ai\TUNING_CODE_ALLOW_SITE_COPILOT
const TUNING_CODE_ALLOW_SITE_COPILOT
Определения
ai.php:27
Bitrix\Landing\Copilot\Manager\isFeatureEnabled
static isFeatureEnabled()
Определения
Manager.php:31
Bitrix\Landing\Copilot\Manager\getLimitSliderCode
static getLimitSliderCode()
Определения
Manager.php:58
Bitrix\Landing\Copilot\Manager\isAvailable
static isAvailable()
Определения
Manager.php:21
Bitrix\Landing\Copilot\Manager\getUnactiveSliderCode
static getUnactiveSliderCode()
Определения
Manager.php:63
Bitrix\Landing\Copilot\Manager\isActive
static isActive()
Определения
Manager.php:45
Bitrix\Landing\Manager\getZone
static getZone()
Определения
manager.php:930
Bitrix\Landing\Connector
Определения
ai.php:3
Bitrix\Landing
Определения
agent.php:3
$manager
$manager
Определения
office365push.php:39
bitrix
modules
landing
lib
Copilot
Manager.php
Создано системой
1.14.0