Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
blocktype.php
1
<?php
2
3
4
namespace
Bitrix\Sale\Helpers\Admin\Blocks
;
5
6
7
class
BlockType
8
{
9
const
UNDEFINED
= 0;
10
11
const
SHIPMENT_STATUS
= 1;
12
const
SHIPMENT_BASKET
= 2;
13
const
FINANCE_INFO
= 3;
14
const
ADDITIONAL
= 4;
15
const
SHIPMENT
= 5;
16
const
PAYMENT
= 6;
17
const
STATUS
= 7;
18
const
BASKET
= 8;
19
const
BUYER
= 9;
20
const
INFO
= 10;
21
const
MARKER
= 11;
22
const
ANALYSIS
= 12;
23
const
DELIVERY
= 13;
24
const
DISCOUNT
= 14;
25
26
const
SHIPMENT_BASKET_NAME
=
"goodsList"
;
27
const
SHIPMENT_STATUS_NAME
=
"shipmentStatus"
;
28
const
FINANCE_INFO_NAME
=
"financeinfo"
;
29
const
ADDITIONAL_NAME
=
"additional"
;
30
const
SHIPMENT_NAME
=
"shipment"
;
31
const
PAYMENT_NAME
=
"payment"
;
32
const
STATUS_NAME
=
"statusorder"
;
33
const
BASKET_NAME
=
"basket"
;
34
const
BUYER_NAME
=
"buyer"
;
35
const
INFO_NAME
=
""
;
36
const
MARKER_NAME
=
""
;
37
const
ANALYSIS_NAME
=
"analysis"
;
38
const
DELIVERY_NAME
=
"delivery"
;
39
const
DISCOUNT_NAME
=
"discount"
;
40
41
const
FIRST_TYPE
= 1;
42
const
LAST_TYPE
= 14;
43
44
public
static
function
isDefined
($typeId)
45
{
46
if
(!is_int($typeId))
47
{
48
$typeId = (int)$typeId;
49
}
50
51
return
$typeId >= self::FIRST_TYPE && $typeId <=
self::LAST_TYPE
;
52
}
53
54
public
static
function
resolveId
($name)
55
{
56
if
($name ==
''
)
57
{
58
return
self::UNDEFINED
;
59
}
60
61
switch
($name)
62
{
63
case
self::SHIPMENT_STATUS_NAME
:
64
return
self::SHIPMENT_STATUS
;
65
case
self::SHIPMENT_BASKET_NAME
:
66
return
self::SHIPMENT_BASKET
;
67
case
self::FINANCE_INFO_NAME
:
68
return
self::FINANCE_INFO
;
69
case
self::ADDITIONAL_NAME
:
70
return
self::ADDITIONAL
;
71
case
self::SHIPMENT_NAME
:
72
return
self::SHIPMENT
;
73
case
self::PAYMENT_NAME
:
74
return
self::PAYMENT
;
75
case
self::STATUS_NAME
:
76
return
self::STATUS
;
77
case
self::BASKET_NAME
:
78
return
self::BASKET
;
79
case
self::BUYER_NAME
:
80
return
self::BUYER
;
81
case
self::INFO_NAME
:
82
return
self::INFO
;
83
case
self::MARKER_NAME
:
84
return
self::MARKER
;
85
case
self::ANALYSIS_NAME
:
86
return
self::ANALYSIS
;
87
case
self::DELIVERY_NAME
:
88
return
self::DELIVERY
;
89
case
self::DISCOUNT_NAME
:
90
return
self::DISCOUNT
;
91
92
default
:
93
return
self::UNDEFINED
;
94
}
95
}
96
97
public
static
function
resolveName
($typeId)
98
{
99
if
(!is_numeric($typeId))
100
{
101
return
''
;
102
}
103
104
$typeId = intval($typeId);
105
if
($typeId <= 0)
106
{
107
return
''
;
108
}
109
110
switch
($typeId)
111
{
112
case
self::SHIPMENT_STATUS
:
113
return
self::SHIPMENT_STATUS_NAME
;
114
case
self::SHIPMENT_BASKET
:
115
return
self::SHIPMENT_BASKET_NAME
;
116
case
self::FINANCE_INFO
:
117
return
self::FINANCE_INFO_NAME
;
118
case
self::ADDITIONAL
:
119
return
self::ADDITIONAL_NAME
;
120
case
self::SHIPMENT
:
121
return
self::SHIPMENT_NAME
;
122
case
self::PAYMENT
:
123
return
self::PAYMENT_NAME
;
124
case
self::STATUS
:
125
return
self::STATUS_NAME
;
126
case
self::BASKET
:
127
return
self::BASKET_NAME
;
128
case
self::BUYER
:
129
return
self::BUYER_NAME
;
130
case
self::INFO
:
131
return
self::INFO_NAME
;
132
case
self::MARKER
:
133
return
self::MARKER_NAME
;
134
case
self::ANALYSIS
:
135
return
self::ANALYSIS_NAME
;
136
case
self::DELIVERY
:
137
return
self::DELIVERY_NAME
;
138
case
self::DISCOUNT
:
139
return
self::DISCOUNT_NAME
;
140
141
case
self::UNDEFINED
:
142
default
:
143
return
''
;
144
}
145
}
146
}
Bitrix\Sale\Helpers\Admin\Blocks\BlockType
Definition
blocktype.php:8
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\isDefined
static isDefined($typeId)
Definition
blocktype.php:44
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\MARKER
const MARKER
Definition
blocktype.php:21
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\DELIVERY_NAME
const DELIVERY_NAME
Definition
blocktype.php:38
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\ANALYSIS_NAME
const ANALYSIS_NAME
Definition
blocktype.php:37
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\ADDITIONAL
const ADDITIONAL
Definition
blocktype.php:14
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\SHIPMENT_STATUS
const SHIPMENT_STATUS
Definition
blocktype.php:11
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\DISCOUNT_NAME
const DISCOUNT_NAME
Definition
blocktype.php:39
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\SHIPMENT_STATUS_NAME
const SHIPMENT_STATUS_NAME
Definition
blocktype.php:27
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\LAST_TYPE
const LAST_TYPE
Definition
blocktype.php:42
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\STATUS_NAME
const STATUS_NAME
Definition
blocktype.php:32
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\FINANCE_INFO_NAME
const FINANCE_INFO_NAME
Definition
blocktype.php:28
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\FIRST_TYPE
const FIRST_TYPE
Definition
blocktype.php:41
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\INFO_NAME
const INFO_NAME
Definition
blocktype.php:35
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\resolveName
static resolveName($typeId)
Definition
blocktype.php:97
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\BUYER_NAME
const BUYER_NAME
Definition
blocktype.php:34
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\SHIPMENT_NAME
const SHIPMENT_NAME
Definition
blocktype.php:30
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\ADDITIONAL_NAME
const ADDITIONAL_NAME
Definition
blocktype.php:29
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\MARKER_NAME
const MARKER_NAME
Definition
blocktype.php:36
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\FINANCE_INFO
const FINANCE_INFO
Definition
blocktype.php:13
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\BASKET_NAME
const BASKET_NAME
Definition
blocktype.php:33
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\BUYER
const BUYER
Definition
blocktype.php:19
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\SHIPMENT_BASKET
const SHIPMENT_BASKET
Definition
blocktype.php:12
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\DISCOUNT
const DISCOUNT
Definition
blocktype.php:24
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\SHIPMENT_BASKET_NAME
const SHIPMENT_BASKET_NAME
Definition
blocktype.php:26
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\PAYMENT
const PAYMENT
Definition
blocktype.php:16
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\resolveId
static resolveId($name)
Definition
blocktype.php:54
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\UNDEFINED
const UNDEFINED
Definition
blocktype.php:9
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\DELIVERY
const DELIVERY
Definition
blocktype.php:23
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\BASKET
const BASKET
Definition
blocktype.php:18
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\SHIPMENT
const SHIPMENT
Definition
blocktype.php:15
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\PAYMENT_NAME
const PAYMENT_NAME
Definition
blocktype.php:31
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\ANALYSIS
const ANALYSIS
Definition
blocktype.php:22
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\INFO
const INFO
Definition
blocktype.php:20
Bitrix\Sale\Helpers\Admin\Blocks\BlockType\STATUS
const STATUS
Definition
blocktype.php:17
Bitrix\Sale\Helpers\Admin\Blocks
modules
sale
lib
helpers
admin
blocks
blocktype.php
Создано системой
1.10.0