Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
orderprops_value.php
1
<?php
8
namespace
Bitrix\Sale\Internals
;
9
10
use Bitrix\Main\Entity\DataManager,
11
Bitrix\Main\Entity\Validator;
12
use
Bitrix\Main\ORM\Fields\Validators\EnumValidator
;
13
use
Bitrix\Sale\Registry
;
14
31
class
OrderPropsValueTable
extends
DataManager
32
{
33
public
static
function
getFilePath
()
34
{
35
return
__FILE__;
36
}
37
38
public
static
function
getTableName
()
39
{
40
return
'b_sale_order_props_value'
;
41
}
42
43
public
static
function
getMap
()
44
{
45
return
array(
46
'ID'
=> array(
47
'primary'
=>
true
,
48
'autocomplete'
=>
true
,
49
'data_type'
=>
'integer'
,
50
'format'
=>
'/^[0-9]{1,11}$/'
,
51
),
52
'ORDER_ID'
=> array(
53
'data_type'
=>
'integer'
,
54
'format'
=>
'/^[0-9]{1,11}$/'
,
55
),
56
'ORDER_PROPS_ID'
=> array(
57
'data_type'
=>
'integer'
,
58
'format'
=>
'/^[0-9]{1,11}$/'
,
59
),
60
'NAME'
=> array(
61
'required'
=>
true
,
62
'data_type'
=>
'string'
,
63
'validation'
=> array(__CLASS__,
'getNameValidators'
),
64
),
65
'VALUE'
=> array(
66
'data_type'
=>
'string'
,
67
'validation'
=> array(
'Bitrix\Sale\Internals\OrderPropsTable'
,
'getValueValidators'
),
68
'save_data_modification'
=> array(
'Bitrix\Sale\Internals\OrderPropsTable'
,
'getValueSaveModifiers'
),
69
'fetch_data_modification'
=> array(
'Bitrix\Sale\Internals\OrderPropsTable'
,
'getValueFetchModifiers'
),
70
),
71
'CODE'
=> array(
72
'data_type'
=>
'string'
,
73
'validation'
=> array(__CLASS__,
'getCodeValidators'
),
74
),
75
76
'PROPERTY'
=> array(
77
'data_type'
=>
'Bitrix\Sale\Internals\OrderPropsTable'
,
78
'reference'
=> array(
'=this.ORDER_PROPS_ID'
=>
'ref.ID'
),
79
'join_type'
=>
'LEFT'
,
80
),
81
'XML_ID'
=> array(
82
'data_type'
=>
'string'
,
83
),
84
'ENTITY_ID'
=> array(
85
'data_type'
=>
'integer'
,
86
'format'
=>
'/^[0-9]{1,11}$/'
,
87
),
88
'ENTITY_TYPE'
=> array(
89
'data_type'
=>
'enum'
,
90
'required'
=>
true
,
91
'validation'
=> array(__CLASS__,
'validateEntityType'
),
92
'values'
=> static::getEntityTypes()
93
),
94
);
95
}
96
97
public
static
function
getEntityTypes
()
98
{
99
return
[
100
Registry::ENTITY_ORDER
,
101
Registry::ENTITY_SHIPMENT
,
102
];
103
}
104
105
public
static
function
validateEntityType
()
106
{
107
return
[
108
new
EnumValidator
(),
109
];
110
}
111
112
public
static
function
getNameValidators
()
113
{
114
return
array(
115
new
Validator\Length(1, 255),
116
);
117
}
118
119
public
static
function
getCodeValidators
()
120
{
121
return
array(
122
new
Validator\Length(
null
, 50),
123
);
124
}
125
}
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Fields\Validators\EnumValidator
Definition
enumvalidator.php:14
Bitrix\Sale\Internals\OrderPropsValueTable
Definition
orderprops_value.php:32
Bitrix\Sale\Internals\OrderPropsValueTable\getMap
static getMap()
Definition
orderprops_value.php:43
Bitrix\Sale\Internals\OrderPropsValueTable\validateEntityType
static validateEntityType()
Definition
orderprops_value.php:105
Bitrix\Sale\Internals\OrderPropsValueTable\getCodeValidators
static getCodeValidators()
Definition
orderprops_value.php:119
Bitrix\Sale\Internals\OrderPropsValueTable\getFilePath
static getFilePath()
Definition
orderprops_value.php:33
Bitrix\Sale\Internals\OrderPropsValueTable\getEntityTypes
static getEntityTypes()
Definition
orderprops_value.php:97
Bitrix\Sale\Internals\OrderPropsValueTable\getNameValidators
static getNameValidators()
Definition
orderprops_value.php:112
Bitrix\Sale\Internals\OrderPropsValueTable\getTableName
static getTableName()
Definition
orderprops_value.php:38
Bitrix\Sale\Registry
Definition
registry.php:13
Bitrix\Sale\Registry\ENTITY_ORDER
const ENTITY_ORDER
Definition
registry.php:20
Bitrix\Sale\Registry\ENTITY_SHIPMENT
const ENTITY_SHIPMENT
Definition
registry.php:19
Bitrix\Sale\Internals
Definition
accountnumber.php:3
modules
sale
lib
internals
orderprops_value.php
Создано системой
1.10.0