1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
restactivity.php
См. документацию.
1
<?php
2
namespace
Bitrix\Bizproc;
3
4
use Bitrix\Main\Entity;
5
use Bitrix\Main\ORM\Fields\Field;
6
44
class
RestActivityTable
extends
Entity\DataManager
45
{
51
public
static
function
getFilePath
()
52
{
53
return
__FILE__;
54
}
55
61
public
static
function
getTableName
()
62
{
63
return
'b_bp_rest_activity'
;
64
}
65
71
public
static
function
getMap
()
72
{
73
return
array
(
74
'ID'
=>
array
(
75
'data_type'
=>
'integer'
,
76
'primary'
=>
true
,
77
'autocomplete'
=>
true
,
78
),
79
'APP_ID'
=>
array
(
80
'data_type'
=>
'string'
,
81
'required'
=>
true
,
82
'validation'
=>
array
(__CLASS__,
'validateAppId'
),
83
),
84
'APP_NAME'
=>
array
(
85
'data_type'
=>
'text'
,
86
'required'
=>
true
,
87
'serialized'
=>
true
,
88
'save_data_modification'
=>
array
(__CLASS__,
'getLocalizationSaveModifiers'
),
89
),
90
'CODE'
=>
array
(
91
'data_type'
=>
'string'
,
92
'required'
=>
true
,
93
'validation'
=>
array
(__CLASS__,
'validateCode'
),
94
),
95
'INTERNAL_CODE'
=>
array
(
96
'data_type'
=>
'string'
,
97
'required'
=>
true
,
98
),
99
'HANDLER'
=>
array
(
100
'data_type'
=>
'string'
,
101
'required'
=>
true
,
102
'validation'
=>
array
(__CLASS__,
'validateHandler'
),
103
),
104
'AUTH_USER_ID'
=>
array
(
105
'data_type'
=>
'integer'
,
106
'default_value'
=> 0
107
),
108
'USE_SUBSCRIPTION'
=>
array
(
109
'data_type'
=>
'string'
110
),
111
'USE_PLACEMENT'
=>
array
(
112
'data_type'
=>
'boolean'
,
113
'values'
=> [
'N'
,
'Y'
]
114
),
115
'NAME'
=>
array
(
116
'data_type'
=>
'text'
,
117
'required'
=>
true
,
118
'serialized'
=>
true
,
119
'save_data_modification'
=>
array
(__CLASS__,
'getLocalizationSaveModifiers'
),
120
),
121
'DESCRIPTION'
=>
array
(
122
'data_type'
=>
'text'
,
123
'serialized'
=>
true
,
124
'save_data_modification'
=>
array
(__CLASS__,
'getLocalizationSaveModifiers'
),
125
),
126
'PROPERTIES'
=>
array
(
127
'data_type'
=>
'text'
,
128
'serialized'
=>
true
,
129
'validation'
=>
array
(__CLASS__,
'validateProperties'
),
130
),
131
'RETURN_PROPERTIES'
=>
array
(
132
'data_type'
=>
'text'
,
133
'serialized'
=>
true
,
134
'validation'
=>
array
(__CLASS__,
'validateProperties'
),
135
),
136
'DOCUMENT_TYPE'
=>
array
(
137
'data_type'
=>
'text'
,
138
'serialized'
=>
true
,
139
),
140
'FILTER'
=>
array
(
141
'data_type'
=>
'text'
,
142
'serialized'
=>
true
,
143
),
144
'IS_ROBOT'
=>
array
(
145
'data_type'
=>
'boolean'
,
146
'values'
=> [
'N'
,
'Y'
]
147
),
148
);
149
}
150
156
public
static
function
validateAppId
()
157
{
158
return
array
(
159
new
Entity
\
Validator
\Length(
null
, 128),
160
);
161
}
162
168
public
static
function
validateCode
()
169
{
170
return
array
(
171
new
Entity
\
Validator
\Length(
null
, 128),
172
);
173
}
174
180
public
static
function
validateHandler
()
181
{
182
return
array
(
183
new
Entity
\
Validator
\Length(
null
, 1000),
184
);
185
}
186
190
public
static
function
getLocalizationSaveModifiers
()
191
{
192
return
array
(
array
(__CLASS__,
'prepareLocalization'
));
193
}
194
200
public
static
function
validateProperties
()
201
{
202
return
array
(
203
function
($value, $primary, $row,
Field
$field) {
204
$errorMsg
=
GetMessage
(
"BPRAT_PROPERTIES_LENGTH_ERROR"
,
array
(
"#FIELD_TITLE#"
=> $field->
getTitle
()));
205
return
strlen(serialize($value)) < 65535 ? true :
$errorMsg
;
206
}
207
);
208
}
209
214
public
static
function
prepareLocalization
($value)
215
{
216
if
(!is_array($value))
217
$value =
array
(
'*'
=> (
string
) $value);
218
return
$value;
219
}
220
226
public
static
function
getLocalization
($field, $langId)
227
{
228
$result
=
''
;
229
$langId = mb_strtoupper($langId);
230
if
(is_string($field))
231
$result
= $field;
232
elseif
(!empty($field[$langId]))
233
$result
= $field[$langId];
234
elseif
($langId ==
'UA'
&& !empty($field[
'RU'
]))
235
$result
= $field[
'RU'
];
236
elseif
(!empty($field[
'EN'
]))
237
$result
= $field[
'EN'
];
238
elseif
(!empty($field[
'*'
]))
239
$result
= $field[
'*'
];
240
return
$result
;
241
}
242
}
Bitrix\Bizproc\RestActivityTable
Определения
restactivity.php:45
Bitrix\Bizproc\RestActivityTable\validateAppId
static validateAppId()
Определения
restactivity.php:156
Bitrix\Bizproc\RestActivityTable\getMap
static getMap()
Определения
restactivity.php:71
Bitrix\Bizproc\RestActivityTable\getFilePath
static getFilePath()
Определения
restactivity.php:51
Bitrix\Bizproc\RestActivityTable\validateHandler
static validateHandler()
Определения
restactivity.php:180
Bitrix\Bizproc\RestActivityTable\validateProperties
static validateProperties()
Определения
restactivity.php:200
Bitrix\Bizproc\RestActivityTable\getLocalization
static getLocalization($field, $langId)
Определения
restactivity.php:226
Bitrix\Bizproc\RestActivityTable\prepareLocalization
static prepareLocalization($value)
Определения
restactivity.php:214
Bitrix\Bizproc\RestActivityTable\getLocalizationSaveModifiers
static getLocalizationSaveModifiers()
Определения
restactivity.php:190
Bitrix\Bizproc\RestActivityTable\getTableName
static getTableName()
Определения
restactivity.php:61
Bitrix\Bizproc\RestActivityTable\validateCode
static validateCode()
Определения
restactivity.php:168
Bitrix\Bizproc\Validator
Определения
validator.php:9
Bitrix\Main\ORM\Fields\Field
Определения
field.php:25
Bitrix\Main\ORM\Fields\Field\getTitle
getTitle()
Определения
field.php:517
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
GetMessage
GetMessage($name, $aReplace=null)
Определения
tools.php:3397
Bitrix\Main\Entity
Определения
ufield.php:9
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
$errorMsg
$errorMsg
Определения
refund.php:16
bitrix
modules
bizproc
lib
restactivity.php
Создано системой
1.14.0