1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
section.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Rest\Preset\Data;
4
5
use Bitrix\Main\ArgumentException;
6
use Bitrix\Main\Data\Cache;
7
use Bitrix\Main\Localization\Loc;
8
use Bitrix\Main\Web\Json;
9
use Bitrix\Rest\Dictionary\IntegrationSection;
10
11
Loc::loadMessages(__FILE__);
12
17
class
Section
extends
Base
18
{
19
private
const
DEFAULT_DATA = [
20
'migration'
=> [
21
'CODE'
=>
'migration'
,
22
'SECTION_CODE'
=>
'migration'
,
23
'ACTIVE'
=>
'Y'
,
24
'ICON_CLASS'
=>
'ui-icon ui-icon-service-arrows'
,
25
'ICON_I_BG_COLOR'
=>
'#2fc6f5'
,
26
'TITLE.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_NAME_MIGRATION'
,
27
'DESCRIPTION.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_DESCRIPTION_MIGRATION'
,
28
],
29
'external'
=> [
30
'CODE'
=>
'external'
,
31
'SECTION_CODE'
=>
'external'
,
32
'ACTIVE'
=>
'Y'
,
33
'ADMIN_ONLY'
=>
'Y'
,
34
'ICON_CLASS'
=>
'ui-icon ui-icon-service-wheel'
,
35
'ICON_I_BG_COLOR'
=>
'#55d0e0'
,
36
'TITLE.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_NAME_EXTERNAL_SYSTEMS'
,
37
'DESCRIPTION.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_DESCRIPTION_EXTERNAL_SYSTEMS'
,
38
],
39
'auto-sales'
=> [
40
'CODE'
=>
'auto-sales'
,
41
'SECTION_CODE'
=>
'auto-sales'
,
42
'ACTIVE'
=>
'Y'
,
43
'ICON_CLASS'
=>
'ui-icon ui-icon-service-cart'
,
44
'ICON_I_BG_COLOR'
=>
'#9dcf01'
,
45
'TITLE.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_NAME_AUTOMATE_SALES'
,
46
'DESCRIPTION.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_DESCRIPTION_AUTOMATE_SALES'
,
47
],
48
'auto-control'
=> [
49
'CODE'
=>
'auto-control'
,
50
'SECTION_CODE'
=>
'auto-control'
,
51
'ACTIVE'
=>
'Y'
,
52
'ICON_CLASS'
=>
'ui-icon ui-icon-service-play'
,
53
'ICON_I_BG_COLOR'
=>
'#1eae43'
,
54
'TITLE.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_NAME_AUTOMATE_CONTROL'
,
55
'DESCRIPTION.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_DESCRIPTION_AUTOMATE_CONTROL_MSGVER_1'
,
56
],
57
'widget'
=> [
58
'CODE'
=>
'widget'
,
59
'SECTION_CODE'
=>
'widget'
,
60
'ACTIVE'
=>
'Y'
,
61
'ICON_CLASS'
=>
'ui-icon ui-icon-service-widget'
,
62
'ICON_I_BG_COLOR'
=>
'#ffa901'
,
63
'TITLE.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_NAME_WIDGET'
,
64
'DESCRIPTION.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_DESCRIPTION_WIDGET'
,
65
],
66
'chat-bot'
=> [
67
'CODE'
=>
'chat-bot'
,
68
'SECTION_CODE'
=>
'chat-bot'
,
69
'ACTIVE'
=>
'Y'
,
70
'ICON_CLASS'
=>
'ui-icon ui-icon-service-chatbot'
,
71
'ICON_I_BG_COLOR'
=>
'#ff5752'
,
72
'TITLE.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_NAME_CHAT_BOT'
,
73
'DESCRIPTION.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_DESCRIPTION_CHAT_BOT'
,
74
],
75
'standard'
=> [
76
'CODE'
=>
'standard'
,
77
'SECTION_CODE'
=>
'standard'
,
78
'ACTIVE'
=>
'Y'
,
79
'ICON_CLASS'
=>
'ui-icon ui-icon-service-other'
,
80
'ICON_I_BG_COLOR'
=>
'#c374d1'
,
81
'TITLE.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_NAME_STANDARD'
,
82
'DESCRIPTION.MESSAGE_CODE'
=>
'REST_INTEGRATION_OPTION_SECTION_DESCRIPTION_STANDARD'
,
83
],
84
];
85
private
const
CACHE_DIR =
'/rest/integration/section/'
;
86
91
public
static
function
get
() :
array
92
{
93
$result
= [];
94
$cache = Cache::createInstance();
95
if
($cache->initCache(static::CACHE_TIME,
'sectionsIndexPage'
. LANGUAGE_ID, static::CACHE_DIR))
96
{
97
$result
= $cache->getVars();
98
}
99
elseif
($cache->startDataCache())
100
{
101
$dictionary =
new
IntegrationSection
();
102
foreach
($dictionary as $el)
103
{
104
if
(!empty($el[
'option'
]))
105
{
106
$data
= Json::decode(base64_decode($el[
'option'
]));
107
if
(is_array(
$data
))
108
{
109
$data
= static::changeMessage(
$data
);
110
$data
[
'CODE'
] =
$data
[
'SECTION_CODE'
];
111
$result
[
$data
[
'CODE'
]] =
$data
;
112
}
113
}
114
}
115
116
if
(empty(
$result
))
117
{
118
$result
= static::changeMessage(static::DEFAULT_DATA);
119
}
120
121
$cache->endDataCache(
$result
);
122
}
123
124
return
$result
;
125
}
126
}
Bitrix\Rest\Dictionary\IntegrationSection
Определения
integrationsection.php:12
Bitrix\Rest\Preset\Data\Base
Определения
base.php:12
Bitrix\Rest\Preset\Data\Section
Определения
section.php:18
$data
$data['IS_AVAILABLE']
Определения
.description.php:13
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
bitrix
modules
rest
lib
preset
data
section.php
Создано системой
1.14.0