1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
help.php
См. документацию.
1
<?php
2
namespace
Bitrix\Landing;
3
4
use Bitrix\Main\Loader;
5
use Bitrix\UI\Util;
6
7
class
Help
8
{
9
public
const
DEFAULT_ZONE_ID
=
'ru'
;
10
14
protected
static
array
$domains
= [
15
'ru'
=>
'bitrix24.ru'
,
16
'by'
=>
'bitrix24.by'
,
17
'kz'
=>
'bitrix24.kz'
,
18
'ua'
=>
'bitrix24.ua'
,
19
'en'
=>
'bitrix24.com'
,
20
'de'
=>
'bitrix24.de'
,
21
'es'
=>
'bitrix24.es'
,
22
'br'
=>
'bitrix24.com.br'
,
23
'pl'
=>
'bitrix24.pl'
,
24
'fr'
=>
'bitrix24.fr'
,
25
'cn'
=>
'bitrix24.cn'
,
26
'in'
=>
'bitrix24.in'
,
27
'eu'
=>
'bitrix24.eu'
,
28
'tr'
=>
'bitrix24.com.tr'
,
29
'it'
=>
'bitrix24.it'
,
30
'id'
=>
'bitrix24.id'
,
31
'vn'
=>
'bitrix24.vn'
,
32
'jp'
=>
'bitrix24.jp'
,
33
'uz'
=>
'bitrix24.uz'
,
34
];
35
39
protected
static
array
$helpUrl
= [
40
'SITE_LIMIT_REACHED'
=> [
41
'ru'
=>
'6519197'
,
42
],
43
'LANDING_EDIT'
=> [
44
'ru'
=>
's105667'
,
45
],
46
'DOMAIN_EDIT'
=> [
47
'ru'
=>
'6624333'
,
48
],
49
'DOMAIN_BITRIX24'
=> [
50
'ru'
=>
'11341354'
51
],
52
'COOKIES_EDIT'
=> [
53
'ru'
=>
'12297162'
,
54
],
55
'DOMAIN_FREE'
=> [
56
'ru'
=>
'11341378'
,
57
],
58
'GMAP_EDIT'
=> [
59
'ru'
=>
'8203739'
,
60
],
61
'PIXEL'
=> [
62
'ru'
=>
'9022893'
,
63
],
64
'GTM'
=> [
65
'ru'
=>
'9488927'
,
66
],
67
'GACOUNTER'
=> [
68
'ru'
=>
'13063040'
,
69
],
70
'META_GOOGLE_VERIFICATION'
=> [
71
'ru'
=>
'7908779'
,
72
],
73
'DYNAMIC_BLOCKS'
=> [
74
'ru'
=>
'10104989'
,
75
],
76
'YACOUNTER'
=> [
77
'ru'
=>
'9494147'
78
],
79
'META_YANDEX_VERIFICATION'
=> [
80
'ru'
=>
'7919271'
81
],
82
'SPEED'
=> [
83
'ru'
=>
'11565144'
,
84
],
85
'FORM_EDIT'
=> [
86
'ru'
=>
'12619286'
,
87
],
88
'FORM_GENERAL'
=> [
89
'ru'
=>
'6875449'
,
90
],
91
'WIDGET_GENERAL'
=> [
92
'ru'
=>
'6986667'
,
93
],
94
'FREE_MESSAGES'
=> [
95
'ru'
=>
'13655934'
96
],
97
'FIRST_ORDER_REQUIREMENTS'
=> [
98
'ru'
=>
'15732254'
99
],
100
'KNOWLEDGE_EXTENSION'
=> [
101
'ru'
=>
'11409302'
,
102
],
103
'B24BUTTON'
=> [
104
'ru'
=>
'17013614'
,
105
],
106
'SHOP1C'
=> [
107
'ru'
=>
'19613828'
,
108
],
109
'WIDGET_LIVEFEED'
=> [
110
'ru'
=>
'21379432'
,
111
],
112
];
113
118
public
static
function
getDomains
():
array
119
{
120
return
self::$domains;
121
}
122
129
public
static
function
getHelpData
(
string
$code
, ?
string
$zone =
null
):
array
130
{
131
static
$myZone =
null
;
132
static
$defaultZone = self::DEFAULT_ZONE_ID;
133
134
if
($zone && isset(self::$helpUrl[
$code
][$zone]))
135
{
136
return
[self::$helpUrl[
$code
][$zone], $zone];
137
}
138
139
if
($myZone ===
null
)
140
{
141
$myZone =
Manager::getZone
();
142
}
143
144
if
($myZone ===
'by'
|| $myZone ===
'kz'
|| $myZone ===
'uz'
)
145
{
146
$myZone =
'ru'
;
147
}
148
149
$helpId = 0;
150
$helpZone =
''
;
151
152
if
(isset(self::$helpUrl[
$code
]))
153
{
154
if
(isset(self::$helpUrl[
$code
][$myZone]))
155
{
156
$helpId = self::$helpUrl[
$code
][$myZone];
157
$helpZone = $myZone;
158
}
159
elseif
(isset(self::$helpUrl[
$code
][$defaultZone]))
160
{
161
$helpId = self::$helpUrl[
$code
][$defaultZone];
162
$helpZone = $defaultZone;
163
}
164
}
165
166
return
[$helpId, $helpZone];
167
}
168
174
public
static
function
getHelpUrl
(
string
$code
): string
175
{
176
if
(isset(self::$helpUrl[
$code
][
'ru'
]))
177
{
178
$url
=
self::getHelpArticleUrl
(self::$helpUrl[
$code
][
'ru'
]);
179
if
(
$url
!==
''
)
180
{
181
return
$url
;
182
}
183
}
184
185
return
''
;
186
}
187
193
public
static
function
getHelpArticleUrl
(
string
$code
): string
194
{
195
if
(Loader::includeModule(
'ui'
))
196
{
197
return
Util::getArticleUrlByCode(
$code
);
198
}
199
200
return
''
;
201
}
202
209
public
static
function
replaceHelpUrl
(
string
$content
): string
210
{
211
return
preg_replace_callback(
212
'/#HELP_LINK_([\w]+)#/'
,
213
function
($match)
214
{
215
return \Bitrix\Landing\Help::getHelpUrl($match[1]);
216
},
217
$content
218
);
219
}
220
}
Bitrix\Landing\Help
Определения
help.php:8
Bitrix\Landing\Help\getHelpArticleUrl
static getHelpArticleUrl(string $code)
Определения
help.php:193
Bitrix\Landing\Help\DEFAULT_ZONE_ID
const DEFAULT_ZONE_ID
Определения
help.php:9
Bitrix\Landing\Help\$helpUrl
static array $helpUrl
Определения
help.php:39
Bitrix\Landing\Help\replaceHelpUrl
static replaceHelpUrl(string $content)
Определения
help.php:209
Bitrix\Landing\Help\$domains
static array $domains
Определения
help.php:14
Bitrix\Landing\Help\getHelpUrl
static getHelpUrl(string $code)
Определения
help.php:174
Bitrix\Landing\Help\getHelpData
static getHelpData(string $code, ?string $zone=null)
Определения
help.php:129
Bitrix\Landing\Help\getDomains
static getDomains()
Определения
help.php:118
Bitrix\Landing\Manager\getZone
static getZone()
Определения
manager.php:930
$content
$content
Определения
commerceml.php:144
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
$url
$url
Определения
iframe.php:7
bitrix
modules
landing
lib
help.php
Создано системой
1.14.0