1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
page.php
См. документацию.
1
<?php
2
namespace
Bitrix\Landing\Hook
;
3
4
use \Bitrix\Landing\Manager;
5
6
abstract
class
Page
7
{
12
protected
$editMode
=
false
;
13
18
protected
$fields
=
array
();
19
24
protected
$fieldsPage
=
array
();
25
30
protected
$isPage
=
true
;
31
36
protected
$customExec
=
null
;
37
42
protected
$isNeedPublication
=
false
;
43
49
public
function
__construct
(
$editMode
=
false
,
$isPage
=
true
)
50
{
51
if
(
$editMode
)
52
{
53
$this->editMode =
true
;
54
}
55
if
(!
$isPage
)
56
{
57
$this->
isPage
=
false
;
58
}
59
$this->fields = $this->
getMap
();
60
}
61
66
public
function
isPage
()
67
{
68
return
$this->isPage;
69
}
70
75
public
function
getTitle
()
76
{
77
return
''
;
78
}
79
84
public
function
getDescription
()
85
{
86
return
''
;
87
}
88
93
protected
function
isEditMode
()
94
{
95
return
$this->editMode ===
true
;
96
}
97
102
public
function
getSort
()
103
{
104
return
100;
105
}
106
111
public
function
isFree
()
112
{
113
return
true
;
114
}
115
120
public
function
isLocked
()
121
{
122
return
false
;
123
}
124
129
public
function
getLockedMessage
()
130
{
131
return
''
;
132
}
133
137
public
function
isNeedPublication
(): bool
138
{
139
return
$this->isNeedPublication;
140
}
141
146
public
function
getCode
()
147
{
148
$class = new \ReflectionClass($this);
149
return
mb_strtoupper($class->getShortName());
150
}
151
157
public
function
setData
(
array
$data
)
158
{
159
foreach
(
$data
as
$key
=> $value)
160
{
161
if
(isset($this->fields[
$key
]))
162
{
163
$this->fields[
$key
]->setValue($value);
164
}
165
}
166
}
167
172
public
function
getPageFields
()
173
{
174
if
(empty($this->fieldsPage))
175
{
176
foreach
($this->fields as $field)
177
{
178
$code
= $field->getCode();
179
$code
= $this->
getCode
() .
'_'
.
$code
;
180
$field->setCode(
$code
);
181
182
$this->fieldsPage[
$code
] = $field;
183
}
184
}
185
186
return
$this->fieldsPage;
187
}
188
193
public
function
getFields
()
194
{
195
return
$this->fields
;
196
}
197
202
public
function
enabledInEditMode
()
203
{
204
return
true
;
205
}
206
211
public
function
enabledInIntranetMode
()
212
{
213
return
true
;
214
}
215
220
public
function
fieldsHash
()
221
{
222
$hash
=
''
;
223
$hash
.= implode(
'.'
, array_keys($this->fields));
224
$hash
.= implode(
'.'
, array_values($this->fields));
225
$hash
= md5(
$hash
);
226
227
return
$hash
;
228
}
229
234
public
function
dataExist
()
235
{
236
return
implode(
''
, array_values($this->fields)) !=
''
;
237
}
238
244
public
function
setCustomExec
(callable $callback)
245
{
246
$this->customExec = $callback;
247
}
248
253
public
function
issetCustomExec
()
254
{
255
return
is_callable($this->customExec);
256
}
257
262
protected
function
execCustom
()
263
{
264
if
($this->customExec)
265
{
266
return
call_user_func_array($this->customExec, [$this]) ===
true
;
267
}
268
return
false
;
269
}
270
275
abstract
protected
function
getMap
();
276
281
abstract
public
function
enabled
();
282
287
abstract
public
function
exec
();
288
}
$hash
$hash
Определения
ajax_redirector.php:8
Bitrix\Landing\Hook\Page\isLocked
isLocked()
Определения
page.php:120
Bitrix\Landing\Hook\Page\$fieldsPage
$fieldsPage
Определения
page.php:24
Bitrix\Landing\Hook\Page\fieldsHash
fieldsHash()
Определения
page.php:220
Bitrix\Landing\Hook\Page\getDescription
getDescription()
Определения
page.php:84
Bitrix\Landing\Hook\Page\$customExec
$customExec
Определения
page.php:36
Bitrix\Landing\Hook\Page\enabledInIntranetMode
enabledInIntranetMode()
Определения
page.php:211
Bitrix\Landing\Hook\Page\getLockedMessage
getLockedMessage()
Определения
page.php:129
Bitrix\Landing\Hook\Page\$isNeedPublication
$isNeedPublication
Определения
page.php:42
Bitrix\Landing\Hook\Page\$isPage
$isPage
Определения
page.php:30
Bitrix\Landing\Hook\Page\__construct
__construct($editMode=false, $isPage=true)
Определения
page.php:49
Bitrix\Landing\Hook\Page\getMap
getMap()
Bitrix\Landing\Hook\Page\setData
setData(array $data)
Определения
page.php:157
Bitrix\Landing\Hook\Page\isPage
isPage()
Определения
page.php:66
Bitrix\Landing\Hook\Page\isNeedPublication
isNeedPublication()
Определения
page.php:137
Bitrix\Landing\Hook\Page\getTitle
getTitle()
Определения
page.php:75
Bitrix\Landing\Hook\Page\dataExist
dataExist()
Определения
page.php:234
Bitrix\Landing\Hook\Page\issetCustomExec
issetCustomExec()
Определения
page.php:253
Bitrix\Landing\Hook\Page\getSort
getSort()
Определения
page.php:102
Bitrix\Landing\Hook\Page\enabledInEditMode
enabledInEditMode()
Определения
page.php:202
Bitrix\Landing\Hook\Page\enabled
enabled()
Bitrix\Landing\Hook\Page\$fields
$fields
Определения
page.php:18
Bitrix\Landing\Hook\Page\isEditMode
isEditMode()
Определения
page.php:93
Bitrix\Landing\Hook\Page\getCode
getCode()
Определения
page.php:146
Bitrix\Landing\Hook\Page\setCustomExec
setCustomExec(callable $callback)
Определения
page.php:244
Bitrix\Landing\Hook\Page\exec
exec()
Bitrix\Landing\Hook\Page\getPageFields
getPageFields()
Определения
page.php:172
Bitrix\Landing\Hook\Page\isFree
isFree()
Определения
page.php:111
Bitrix\Landing\Hook\Page\execCustom
execCustom()
Определения
page.php:262
Bitrix\Landing\Hook\Page\$editMode
$editMode
Определения
page.php:12
Bitrix\Landing\Hook\Page\getFields
getFields()
Определения
page.php:193
$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
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
Bitrix\Landing\Hook\Page
Определения
b24button.php:2
Bitrix\Landing\Hook
Определения
page.php:2
$key
if(empty($signedUserToken)) $key
Определения
quickway.php:257
$fields
$fields
Определения
yandex_run.php:501
bitrix
modules
landing
lib
hook
page.php
Создано системой
1.14.0