Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
cashboxresthandler.php
1
<?php
2
3
namespace
Bitrix\Sale\Internals
;
4
5
use
Bitrix\Main\Localization\Loc
,
6
Bitrix\Main\ORM\Data\DataManager
,
7
Bitrix\Main\ORM\Fields\IntegerField
,
8
Bitrix\Main\ORM\Fields\StringField
,
9
Bitrix\Main\ORM\Fields\TextField
,
10
Bitrix\Main\ORM\Fields\Validators\LengthValidator
;
11
12
Loc::loadMessages
(__FILE__);
13
42
class
CashboxRestHandlerTable
extends
DataManager
43
{
47
public
static
function
getTableName
()
48
{
49
return
'b_sale_cashbox_rest_handler'
;
50
}
51
55
public
static
function
getMap
()
56
{
57
return
[
58
new
IntegerField
(
59
'ID'
,
60
[
61
'primary'
=>
true
,
62
'autocomplete'
=>
true
,
63
'title'
=>
Loc::getMessage
(
'CASHBOX_REST_HANDLER_ENTITY_ID_FIELD'
)
64
]
65
),
66
new
StringField
(
67
'NAME'
,
68
[
69
'required'
=>
true
,
70
'validation'
=> [__CLASS__,
'validateName'
],
71
'title'
=>
Loc::getMessage
(
'CASHBOX_REST_HANDLER_ENTITY_NAME_FIELD'
)
72
]
73
),
74
new
StringField
(
75
'CODE'
,
76
[
77
'required'
=>
true
,
78
'validation'
=> [__CLASS__,
'validateCode'
],
79
'title'
=>
Loc::getMessage
(
'CASHBOX_REST_HANDLER_ENTITY_CODE_FIELD'
)
80
]
81
),
82
new
IntegerField
(
83
'SORT'
,
84
[
85
'default'
=> 100,
86
'title'
=>
Loc::getMessage
(
'CASHBOX_REST_HANDLER_ENTITY_SORT_FIELD'
)
87
]
88
),
89
new
TextField
(
90
'SETTINGS'
,
91
[
92
'required'
=>
true
,
93
'title'
=>
Loc::getMessage
(
'CASHBOX_REST_HANDLER_ENTITY_SETTINGS_FIELD'
),
94
'serialized'
=>
true
,
95
]
96
),
97
new
StringField
(
'APP_ID'
),
98
];
99
}
100
106
public
static
function
validateName
()
107
{
108
return
[
109
new
LengthValidator
(
null
, 255),
110
];
111
}
112
118
public
static
function
validateCode
()
119
{
120
return
[
121
new
LengthValidator
(
null
, 50),
122
];
123
}
124
}
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\Internals\CashboxRestHandlerTable
Definition
cashboxresthandler.php:43
Bitrix\Sale\Internals\CashboxRestHandlerTable\getMap
static getMap()
Definition
cashboxresthandler.php:55
Bitrix\Sale\Internals\CashboxRestHandlerTable\validateName
static validateName()
Definition
cashboxresthandler.php:106
Bitrix\Sale\Internals\CashboxRestHandlerTable\getTableName
static getTableName()
Definition
cashboxresthandler.php:47
Bitrix\Sale\Internals\CashboxRestHandlerTable\validateCode
static validateCode()
Definition
cashboxresthandler.php:118
Bitrix\Sale\Internals
Definition
accountnumber.php:3
modules
sale
lib
internals
cashboxresthandler.php
Создано системой
1.10.0