Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
group.php
1
<?php
2
3
namespace
Bitrix\Sale\Delivery\Services
;
4
5
use Bitrix\Main\Entity\EntityError;
6
use
Bitrix\Main\Localization\Loc
;
7
use
Bitrix\Sale\Delivery\CalculationResult
;
8
use
Bitrix\Sale\Shipment
;
9
10
Loc::loadMessages
(__FILE__);
11
12
class
Group
extends
Base
13
{
15
protected
$handlerCode
=
'BITRIX_GROUP'
;
16
17
public
function
__construct
(array $initParams)
18
{
19
if
(!isset($initParams[
"ACTIVE"
]))
20
$initParams[
"ACTIVE"
] =
"Y"
;
21
22
$initParams[
"CONFIG"
] = array();
23
24
parent::__construct($initParams);
25
}
26
27
public
static
function
getClassTitle
()
28
{
29
return
Loc::getMessage
(
"SALE_DLVR_HANDL_GROUP_NAME"
);
30
}
31
32
public
static
function
getClassDescription
()
33
{
34
return
Loc::getMessage
(
"SALE_DLVR_HANDL_GROUP_DESCRIPTION"
);
35
}
36
37
protected
function
calculateConcrete
(
Shipment
$shipment)
38
{
39
$result =
new
CalculationResult
();
40
41
$result->addError(
new
EntityError
(
42
Loc::getMessage
(
"SALE_DLVR_HANDL_GROUP_ERROR_CALCULATION"
),
43
'DELIVERY_CALCULATION'
44
));
45
46
return
$result;
47
}
48
49
protected
function
getConfigStructure
()
50
{
51
return
array();
52
}
53
54
public
static
function
getAdminFieldsList
()
55
{
56
return
array(
57
"ID"
=>
true
,
58
"NAME"
=>
true
,
59
"ACTIVE"
=>
true
,
60
"DESCRIPTION"
=>
true
,
61
"SORT"
=>
true
,
62
);
63
}
64
65
public
static
function
whetherAdminRestrictionsShow
()
66
{
67
return
false
;
68
}
69
70
public
static
function
canHasChildren
()
71
{
72
return
true
;
73
}
74
75
public
static
function
isHandlerCompatible
()
76
{
77
return
true
;
78
}
79
}
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\EntityError
Definition
entityerror.php:12
Bitrix\Sale\Delivery\CalculationResult
Definition
calculationresult.php:12
Bitrix\Sale\Delivery\ExtraServices\Base
Definition
base.php:10
Bitrix\Sale\Delivery\Services\Group
Definition
group.php:13
Bitrix\Sale\Delivery\Services\Group\canHasChildren
static canHasChildren()
Definition
group.php:70
Bitrix\Sale\Delivery\Services\Group\getClassTitle
static getClassTitle()
Definition
group.php:27
Bitrix\Sale\Delivery\Services\Group\getClassDescription
static getClassDescription()
Definition
group.php:32
Bitrix\Sale\Delivery\Services\Group\getAdminFieldsList
static getAdminFieldsList()
Definition
group.php:54
Bitrix\Sale\Delivery\Services\Group\calculateConcrete
calculateConcrete(Shipment $shipment)
Definition
group.php:37
Bitrix\Sale\Delivery\Services\Group\__construct
__construct(array $initParams)
Definition
group.php:17
Bitrix\Sale\Delivery\Services\Group\getConfigStructure
getConfigStructure()
Definition
group.php:49
Bitrix\Sale\Delivery\Services\Group\isHandlerCompatible
static isHandlerCompatible()
Definition
group.php:75
Bitrix\Sale\Delivery\Services\Group\$handlerCode
$handlerCode
Definition
group.php:15
Bitrix\Sale\Delivery\Services\Group\whetherAdminRestrictionsShow
static whetherAdminRestrictionsShow()
Definition
group.php:65
Bitrix\Sale\Shipment
Definition
shipment.php:21
Bitrix\Sale\Delivery\Services
Definition
automatic.php:3
modules
sale
lib
delivery
services
group.php
Создано системой
1.10.0