1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
orderstatus.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Sale;
4
5
use Bitrix\Main;
6
use Bitrix\Sale\Internals\StatusTable;
7
12
class
OrderStatus
extends
StatusBase
13
{
14
const
TYPE
=
'O'
;
15
22
public
static
function
getDisallowPayStatusList
()
23
{
24
$allowFlag =
false
;
25
$resultList =
array
();
26
27
$allowPayStatus =
Main\Config\Option::get
(
"sale"
,
"allow_pay_status"
, static::getInitialStatus());
28
29
$statusList
= static::getAllStatuses();
30
if
(!empty(
$statusList
))
31
{
32
foreach
(
$statusList
as $statusId)
33
{
34
if
($allowPayStatus == $statusId)
35
{
36
break
;
37
}
38
39
if
($allowFlag ===
false
)
40
{
41
$resultList[] = $statusId;
42
}
43
}
44
}
45
46
return
$resultList;
47
}
48
55
public
static
function
getAllowPayStatusList
()
56
{
57
$allowFlag =
false
;
58
$resultList =
array
();
59
60
$allowPayStatus =
Main\Config\Option::get
(
"sale"
,
"allow_pay_status"
, static::getInitialStatus());
61
62
$statusList
= static::getAllStatuses();
63
if
(!empty(
$statusList
))
64
{
65
foreach
(
$statusList
as $statusId)
66
{
67
if
($allowPayStatus == $statusId)
68
{
69
$allowFlag =
true
;
70
}
71
72
if
($allowFlag ===
true
)
73
{
74
$resultList[] = $statusId;
75
}
76
}
77
}
78
79
return
$resultList;
80
}
81
89
public
static
function
isAllowPay
($statusId)
90
{
91
$allowPayStatusList = static::getAllowPayStatusList();
92
93
if
(!empty($allowPayStatusList))
94
{
95
foreach
($allowPayStatusList as $allowStatusId)
96
{
97
if
($allowStatusId == $statusId)
98
{
99
return
true
;
100
}
101
102
}
103
}
104
105
return
false
;
106
}
107
111
public
static
function
getInitialStatus
()
112
{
113
return
'N'
;
114
}
115
119
public
static
function
getFinalStatus
()
120
{
121
return
'F'
;
122
}
123
}
Bitrix\Main\Config\Option\get
static get($moduleId, $name, $default="", $siteId=false)
Определения
option.php:30
Bitrix\Sale\OrderStatus
Определения
orderstatus.php:13
Bitrix\Sale\OrderStatus\getInitialStatus
static getInitialStatus()
Определения
orderstatus.php:111
Bitrix\Sale\OrderStatus\getAllowPayStatusList
static getAllowPayStatusList()
Определения
orderstatus.php:55
Bitrix\Sale\OrderStatus\getDisallowPayStatusList
static getDisallowPayStatusList()
Определения
orderstatus.php:22
Bitrix\Sale\OrderStatus\isAllowPay
static isAllowPay($statusId)
Определения
orderstatus.php:89
Bitrix\Sale\OrderStatus\TYPE
const TYPE
Определения
orderstatus.php:14
Bitrix\Sale\OrderStatus\getFinalStatus
static getFinalStatus()
Определения
orderstatus.php:119
Bitrix\Sale\StatusBase
Определения
statusbase.php:19
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$statusList
if( $guestStatuses !=='') if(!is_array($guestStatuses)) $statusList
Определения
options.php:2065
bitrix
modules
sale
lib
orderstatus.php
Создано системой
1.14.0