Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
handlerbase.php
1
<?
2
namespace
Bitrix\Sale\Delivery\Requests
;
3
4
use
Bitrix\Main
;
5
use
Bitrix\Sale\Delivery
;
6
use
Bitrix\Sale\Shipment
;
7
use
Bitrix\Main\Localization\Loc
;
8
9
Loc::loadMessages
(__FILE__);
10
16
abstract
class
HandlerBase
17
{
18
public
const
CANCEL_ACTION_CODE
=
'CANCEL'
;
19
21
protected
$deliveryService
;
22
27
public
function
__construct
(
Delivery
\Services\
Base
$deliveryService
)
28
{
29
$this->deliveryService =
$deliveryService
;
30
}
31
38
public
function
create
(array $shipmentIds, array $additional = [])
39
{
40
$result =
new
Result
();
41
$result->addError(
new
Main\
Error
(
Loc::getMessage
(
'SALE_DLVR_REQ_BASE_CREATE_NOT_SUPPORT'
)));
42
return
$result;
43
}
44
50
public
function
getActions
($requestId)
51
{
52
return
[];
53
}
54
58
public
function
getCancelActionCode
(): string
59
{
60
return
self::CANCEL_ACTION_CODE
;
61
}
62
66
public
function
getCancelActionName
(): string
67
{
68
return
Loc::getMessage
(
'SALE_DLVR_REQ_BASE_CANCEL_REQUEST'
);
69
}
70
76
public
function
getShipmentActions
(
Shipment
$shipment)
77
{
78
return
[];
79
}
80
88
public
function
executeAction
($requestId, $actionType, array $additional)
89
{
90
$result =
new
Result
();
91
$result->addError(
new
Main\
Error
(
Loc::getMessage
(
'SALE_DLVR_REQ_BASE_ACTIONS_NOT_SUPPORT'
)));
92
return
$result;
93
}
94
103
public
function
executeShipmentAction
($requestId, $shipmentId, $actionType, array $additional)
104
{
105
$result =
new
Result
();
106
$result->addError(
new
Main\
Error
(
Loc::getMessage
(
'SALE_DLVR_REQ_BASE_SHIPMENT_ACTIONS_NOT_SUPPORT'
)));
107
return
$result;
108
}
109
117
public
function
addShipments
($requestId, $shipmentIds, array $additional = [])
118
{
119
$result =
new
Result
();
120
$result->addError(
new
Main\
Error
(
Loc::getMessage
(
'SALE_DLVR_REQ_BASE_SHIPMENT_ADD_NOT_SUPPORT'
)));
121
return
$result;
122
}
123
129
public
function
delete
($requestId)
130
{
131
$result =
new
Result
();
132
$result->addError(
new
Main\
Error
(
Loc::getMessage
(
'SALE_DLVR_REQ_BASE_DELETE_NOT_SUPPORT'
)));
133
return
$result;
134
}
135
142
public
function
deleteShipments
($requestId, array $shipmentIds = [])
143
{
144
$result =
new
Result
();
145
$result->addError(
new
Main\
Error
(
Loc::getMessage
(
'SALE_DLVR_REQ_BASE_SHIPMENT_DELETE_NOT_SUPPORT'
)));
146
return
$result;
147
}
148
155
public
function
updateShipments
($requestId, array $shipmentIds = [])
156
{
157
$result =
new
Result
();
158
$result->addError(
new
Main\
Error
(
Loc::getMessage
(
'SALE_DLVR_REQ_BASE_SHIPMENT_UPDATE_NOT_SUPPORTED'
)));
159
return
$result;
160
}
161
170
public
function
getFormFields
($formFieldsType, array $shipmentIds, array $additional = [])
171
{
172
return
[];
173
}
174
180
public
function
getContent
($requestId)
181
{
182
$result =
new
Result
();
183
$result->addError(
new
Main\
Error
(
Loc::getMessage
(
'SALE_DLVR_REQ_BASE_VIEW_NOT_SUPPORT'
)));
184
return
$result;
185
}
186
193
public
function
getShipmentContent
($requestId, $shipmentId)
194
{
195
$result =
new
Result
();
196
$result->addError(
new
Main\
Error
(
Loc::getMessage
(
'SALE_DLVR_REQ_BASE_SHIPMENT_VIEW_NOT_SUPPORT'
)));
197
return
$result;
198
}
199
204
public
function
getHandlingDeliveryServiceId
()
205
{
206
return
$this->deliveryService->getId();
207
}
208
212
public
function
hasCallbackTrackingSupport
(): bool
213
{
214
return
false
;
215
}
216
}
Bitrix\Main\Error
Definition
error.php:14
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\Result
Definition
result.php:16
Bitrix\Sale\Delivery\ExtraServices\Base
Definition
base.php:10
Bitrix\Sale\Delivery\Requests\HandlerBase
Definition
handlerbase.php:17
Bitrix\Sale\Delivery\Requests\HandlerBase\getHandlingDeliveryServiceId
getHandlingDeliveryServiceId()
Definition
handlerbase.php:204
Bitrix\Sale\Delivery\Requests\HandlerBase\getFormFields
getFormFields($formFieldsType, array $shipmentIds, array $additional=[])
Definition
handlerbase.php:170
Bitrix\Sale\Delivery\Requests\HandlerBase\executeAction
executeAction($requestId, $actionType, array $additional)
Definition
handlerbase.php:88
Bitrix\Sale\Delivery\Requests\HandlerBase\$deliveryService
$deliveryService
Definition
handlerbase.php:21
Bitrix\Sale\Delivery\Requests\HandlerBase\executeShipmentAction
executeShipmentAction($requestId, $shipmentId, $actionType, array $additional)
Definition
handlerbase.php:103
Bitrix\Sale\Delivery\Requests\HandlerBase\getActions
getActions($requestId)
Definition
handlerbase.php:50
Bitrix\Sale\Delivery\Requests\HandlerBase\getShipmentActions
getShipmentActions(Shipment $shipment)
Definition
handlerbase.php:76
Bitrix\Sale\Delivery\Requests\HandlerBase\getShipmentContent
getShipmentContent($requestId, $shipmentId)
Definition
handlerbase.php:193
Bitrix\Sale\Delivery\Requests\HandlerBase\getCancelActionName
getCancelActionName()
Definition
handlerbase.php:66
Bitrix\Sale\Delivery\Requests\HandlerBase\addShipments
addShipments($requestId, $shipmentIds, array $additional=[])
Definition
handlerbase.php:117
Bitrix\Sale\Delivery\Requests\HandlerBase\getContent
getContent($requestId)
Definition
handlerbase.php:180
Bitrix\Sale\Delivery\Requests\HandlerBase\CANCEL_ACTION_CODE
const CANCEL_ACTION_CODE
Definition
handlerbase.php:18
Bitrix\Sale\Delivery\Requests\HandlerBase\hasCallbackTrackingSupport
hasCallbackTrackingSupport()
Definition
handlerbase.php:212
Bitrix\Sale\Delivery\Requests\HandlerBase\getCancelActionCode
getCancelActionCode()
Definition
handlerbase.php:58
Bitrix\Sale\Delivery\Requests\HandlerBase\deleteShipments
deleteShipments($requestId, array $shipmentIds=[])
Definition
handlerbase.php:142
Bitrix\Sale\Delivery\Requests\HandlerBase\__construct
__construct(Delivery\Services\Base $deliveryService)
Definition
handlerbase.php:27
Bitrix\Sale\Delivery\Requests\HandlerBase\updateShipments
updateShipments($requestId, array $shipmentIds=[])
Definition
handlerbase.php:155
Bitrix\Sale\Delivery\Requests\HandlerBase\create
create(array $shipmentIds, array $additional=[])
Definition
handlerbase.php:38
Bitrix\Sale\Services\PaySystem\Restrictions\Delivery
Definition
delivery.php:23
Bitrix\Sale\Shipment
Definition
shipment.php:21
Bitrix\Main
Bitrix\Sale\Delivery\Requests
Definition
handlerbase.php:2
Bitrix\Sale\Delivery
Definition
calculationresult.php:2
modules
sale
lib
delivery
requests
handlerbase.php
Создано системой
1.10.0