Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
deliveryresthandlertable.php
1
<?php
2
namespace
Bitrix\Sale\Delivery\Rest\Internals
;
3
4
use
Bitrix\Main\Localization\Loc
,
5
Bitrix\Main\ORM\Data\DataManager
,
6
Bitrix\Main\ORM\Fields\IntegerField
,
7
Bitrix\Main\ORM\Fields\StringField
,
8
Bitrix\Main\ORM\Fields\TextField
,
9
Bitrix\Main\ORM\Fields\Validators\LengthValidator
;
10
11
Loc::loadMessages
(__FILE__);
12
43
class
DeliveryRestHandlerTable
extends
DataManager
44
{
50
public
static
function
getTableName
()
51
{
52
return
'b_sale_delivery_rest_handler'
;
53
}
54
61
public
static
function
getMap
()
62
{
63
return
[
64
new
IntegerField
(
65
'ID'
,
66
[
67
'primary'
=>
true
,
68
'autocomplete'
=>
true
,
69
'title'
=>
Loc::getMessage
(
'DELIVERY_REST_HANDLER_ENTITY_ID_FIELD'
)
70
]
71
),
72
new
StringField
(
73
'NAME'
,
74
[
75
'required'
=>
true
,
76
'validation'
=> [__CLASS__,
'validateName'
],
77
'title'
=>
Loc::getMessage
(
'DELIVERY_REST_HANDLER_ENTITY_NAME_FIELD'
)
78
]
79
),
80
new
StringField
(
81
'CODE'
,
82
[
83
'required'
=>
true
,
84
'validation'
=> [__CLASS__,
'validateCode'
],
85
'title'
=>
Loc::getMessage
(
'DELIVERY_REST_HANDLER_ENTITY_CODE_FIELD'
)
86
]
87
),
88
new
IntegerField
(
89
'SORT'
,
90
[
91
'default'
=> 100,
92
'title'
=>
Loc::getMessage
(
'DELIVERY_REST_HANDLER_ENTITY_SORT_FIELD'
)
93
]
94
),
95
new
TextField
(
96
'DESCRIPTION'
,
97
[
98
'title'
=>
Loc::getMessage
(
'DELIVERY_REST_HANDLER_ENTITY_DESCRIPTION_FIELD'
)
99
]
100
),
101
new
TextField
(
102
'SETTINGS'
,
103
[
104
'required'
=>
true
,
105
'title'
=>
Loc::getMessage
(
'DELIVERY_REST_HANDLER_ENTITY_SETTINGS_FIELD'
),
106
'serialized'
=>
true
107
]
108
),
109
new
TextField
(
110
'PROFILES'
,
111
[
112
'required'
=>
true
,
113
'title'
=>
Loc::getMessage
(
'DELIVERY_REST_HANDLER_ENTITY_PROFILES_FIELD'
),
114
'serialized'
=>
true
115
]
116
),
117
new
StringField
(
'APP_ID'
),
118
];
119
}
120
127
public
static
function
validateName
()
128
{
129
return
[
130
new
LengthValidator
(
null
, 255),
131
];
132
}
133
140
public
static
function
validateCode
()
141
{
142
return
[
143
new
LengthValidator
(
null
, 50),
144
];
145
}
146
}
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Main\ORM\Fields\TextField
Definition
textfield.php:20
Bitrix\Main\ORM\Fields\Validators\LengthValidator
Definition
lengthvalidator.php:19
Bitrix\Sale\Delivery\Rest\Internals\DeliveryRestHandlerTable
Definition
deliveryresthandlertable.php:44
Bitrix\Sale\Delivery\Rest\Internals\DeliveryRestHandlerTable\getMap
static getMap()
Definition
deliveryresthandlertable.php:61
Bitrix\Sale\Delivery\Rest\Internals\DeliveryRestHandlerTable\validateName
static validateName()
Definition
deliveryresthandlertable.php:127
Bitrix\Sale\Delivery\Rest\Internals\DeliveryRestHandlerTable\getTableName
static getTableName()
Definition
deliveryresthandlertable.php:50
Bitrix\Sale\Delivery\Rest\Internals\DeliveryRestHandlerTable\validateCode
static validateCode()
Definition
deliveryresthandlertable.php:140
Bitrix\Sale\Delivery\Rest\Internals
Definition
deliveryresthandlertable.php:2
modules
sale
lib
delivery
rest
internals
deliveryresthandlertable.php
Создано системой
1.10.0