1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
restprovider.php
См. документацию.
1
<?php
2
namespace
Bitrix\Bizproc;
3
4
use Bitrix\Main\Entity;
5
36
class
RestProviderTable
extends
Entity\DataManager
37
{
38
const
TYPE_SMS
=
'SMS'
;
39
45
public
static
function
getTableName
()
46
{
47
return
'b_bp_rest_provider'
;
48
}
49
55
public
static
function
getMap
()
56
{
57
return
array
(
58
'ID'
=>
array
(
59
'data_type'
=>
'integer'
,
60
'primary'
=>
true
,
61
'autocomplete'
=>
true
,
62
),
63
'APP_ID'
=>
array
(
64
'data_type'
=>
'string'
,
65
'required'
=>
true
,
66
'validation'
=>
array
(__CLASS__,
'validateAppId'
),
67
),
68
'APP_NAME'
=>
array
(
69
'data_type'
=>
'text'
,
70
'required'
=>
true
,
71
'serialized'
=>
true
,
72
'save_data_modification'
=>
array
(__CLASS__,
'getLocalizationSaveModifiers'
),
73
),
74
'CODE'
=>
array
(
75
'data_type'
=>
'string'
,
76
'required'
=>
true
,
77
'validation'
=>
array
(__CLASS__,
'validateCode'
),
78
),
79
'TYPE'
=>
array
(
80
'data_type'
=>
'string'
,
81
'required'
=>
true
,
82
'validation'
=>
array
(__CLASS__,
'validateType'
),
83
),
84
'HANDLER'
=>
array
(
85
'data_type'
=>
'string'
,
86
'required'
=>
true
,
87
'validation'
=>
array
(__CLASS__,
'validateHandler'
),
88
),
89
'NAME'
=>
array
(
90
'data_type'
=>
'text'
,
91
'required'
=>
true
,
92
'serialized'
=>
true
,
93
'save_data_modification'
=>
array
(__CLASS__,
'getLocalizationSaveModifiers'
),
94
),
95
'DESCRIPTION'
=>
array
(
96
'data_type'
=>
'text'
,
97
'serialized'
=>
true
,
98
'save_data_modification'
=>
array
(__CLASS__,
'getLocalizationSaveModifiers'
),
99
),
100
);
101
}
102
108
public
static
function
validateAppId
()
109
{
110
return
array
(
111
new
Entity
\
Validator
\Length(
null
, 128),
112
);
113
}
114
120
public
static
function
validateCode
()
121
{
122
return
array
(
123
new
Entity
\
Validator
\Length(
null
, 128),
124
);
125
}
126
132
public
static
function
validateType
()
133
{
134
return
array
(
135
new
Entity
\
Validator
\Length(
null
, 30),
136
);
137
}
138
144
public
static
function
validateHandler
()
145
{
146
return
array
(
147
new
Entity
\
Validator
\Length(
null
, 1000),
148
);
149
}
150
154
public
static
function
getLocalizationSaveModifiers
()
155
{
156
return
array
(
array
(__CLASS__,
'prepareLocalization'
));
157
}
158
163
public
static
function
prepareLocalization
($value)
164
{
165
if
(!is_array($value))
166
$value =
array
(
'*'
=> (
string
) $value);
167
return
$value;
168
}
169
175
public
static
function
getLocalization
($field, $langId)
176
{
177
$result
=
''
;
178
$langId = mb_strtoupper($langId);
179
if
(is_string($field))
180
$result
= $field;
181
elseif
(!empty($field[$langId]))
182
$result
= $field[$langId];
183
elseif
($langId ==
'UA'
&& !empty($field[
'RU'
]))
184
$result
= $field[
'RU'
];
185
elseif
(!empty($field[
'EN'
]))
186
$result
= $field[
'EN'
];
187
elseif
(!empty($field[
'*'
]))
188
$result
= $field[
'*'
];
189
return
$result
;
190
}
191
196
public
static
function
getTypesList
()
197
{
198
return
array
(static::TYPE_SMS);
199
}
200
}
Bitrix\Bizproc\RestProviderTable
Определения
restprovider.php:37
Bitrix\Bizproc\RestProviderTable\validateAppId
static validateAppId()
Определения
restprovider.php:108
Bitrix\Bizproc\RestProviderTable\getMap
static getMap()
Определения
restprovider.php:55
Bitrix\Bizproc\RestProviderTable\getTypesList
static getTypesList()
Определения
restprovider.php:196
Bitrix\Bizproc\RestProviderTable\validateType
static validateType()
Определения
restprovider.php:132
Bitrix\Bizproc\RestProviderTable\TYPE_SMS
const TYPE_SMS
Определения
restprovider.php:38
Bitrix\Bizproc\RestProviderTable\validateHandler
static validateHandler()
Определения
restprovider.php:144
Bitrix\Bizproc\RestProviderTable\getLocalization
static getLocalization($field, $langId)
Определения
restprovider.php:175
Bitrix\Bizproc\RestProviderTable\prepareLocalization
static prepareLocalization($value)
Определения
restprovider.php:163
Bitrix\Bizproc\RestProviderTable\getLocalizationSaveModifiers
static getLocalizationSaveModifiers()
Определения
restprovider.php:154
Bitrix\Bizproc\RestProviderTable\getTableName
static getTableName()
Определения
restprovider.php:45
Bitrix\Bizproc\RestProviderTable\validateCode
static validateCode()
Определения
restprovider.php:120
Bitrix\Bizproc\Validator
Определения
validator.php:9
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
Bitrix\Main\Entity
Определения
ufield.php:9
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
bitrix
modules
bizproc
lib
restprovider.php
Создано системой
1.14.0