Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
eventactions.php
1<?php
2namespace Bitrix\Sale;
3
5
7{
8 const ADD = "ADD";
9 const UPDATE = "UPDATE";
10 const DELETE = "DELETE";
11
12 // Events new kernel
13 const EVENT_ON_ORDER_PAID = "OnSaleOrderPaid";
14 const EVENT_ON_BEFORE_ORDER_DELETE = "OnSaleBeforeOrderDelete";
15 const EVENT_ON_ORDER_DELETED = "OnSaleOrderDeleted";
16 const EVENT_ON_ORDER_BEFORE_SAVED = "OnSaleOrderBeforeSaved";
17 const EVENT_ON_ORDER_SAVED = "OnSaleOrderSaved";
18 const EVENT_ON_SHIPMENT_DELIVER = "OnSaleShipmentDelivery";
19
20 const EVENT_ON_BEFORE_ORDER_CANCELED = "OnSaleBeforeOrderCanceled";
21 const EVENT_ON_ORDER_CANCELED = "OnSaleOrderCanceled";
22
23 const EVENT_ON_ORDER_PAID_SEND_MAIL = "OnSaleOrderPaidSendMail";
24 const EVENT_ON_ORDER_CANCELED_SEND_MAIL = "OnSaleOrderCancelSendEmail";
25
26 const EVENT_ON_BASKET_BEFORE_SAVED = "OnSaleBasketBeforeSaved";
27 const EVENT_ON_BASKET_ITEM_BEFORE_SAVED = "OnSaleBasketItemBeforeSaved";
28 const EVENT_ON_BASKET_ITEM_SAVED = "OnSaleBasketItemSaved";
29 const EVENT_ON_BASKET_SAVED = "OnSaleBasketSaved";
30
31 const EVENT_ON_SHIPMENT_TRACKING_NUMBER_CHANGE = "OnShipmentTrackingNumberChange";
32 const EVENT_ON_SHIPMENT_ALLOW_DELIVERY = "OnShipmentAllowDelivery";
33 const EVENT_ON_SHIPMENT_DEDUCTED = "OnShipmentDeducted";
34
35 const EVENT_ON_BEFORE_SHIPMENT_RESERVE = "OnSaleBeforeShipmentReserve";
36 const EVENT_ON_SHIPMENT_RESERVED = "OnSaleShipmentReserved";
37
38 const EVENT_ON_PAYMENT_PAID = "OnPaymentPaid";
39
40 const EVENT_ON_BEFORE_ORDER_STATUS_CHANGE = "OnSaleBeforeStatusOrderChange";
41 const EVENT_ON_ORDER_STATUS_CHANGE = "OnSaleStatusOrderChange";
42 const EVENT_ON_ORDER_STATUS_CHANGE_SEND_MAIL = "OnSaleOrderStatusChangeSendEmail";
43
44 const EVENT_ON_BEFORE_SHIPMENT_STATUS_CHANGE = "OnSaleBeforeStatusShipmentChange";
45 const EVENT_ON_SHIPMENT_STATUS_CHANGE = "OnSaleStatusShipmentChange";
46 const EVENT_ON_SHIPMENT_STATUS_CHANGE_SEND_MAIL = "OnSaleShipmentStatusChangeSendEmail";
47
48 const EVENT_ON_ORDER_STATUS_ALLOW_PAY_CHANGE = "OnSaleStatusAllowPayChange";
49 const EVENT_ON_ORDER_STATUS_ALLOW_PAY_CHANGE_SEND_MAIL = "onSaleOrderStatusAllowPaySendEmail";
50
51 const EVENT_ON_ADMIN_ORDER_LIST = "OnSaleAdminOrderList";
52
53 const EVENT_ON_BASKET_ITEM_REFRESH_DATA = "OnSaleBasketItemRefreshData";
54
55 const EVENT_ON_CHECK_PRINT = "OnSalePaymentCheckPrint";
56
57 const EVENT_ON_CHECK_PRINT_ERROR = "OnSalePaymentCheckPrintError";
58
59 const EVENT_ON_CHECK_VALIDATION_ERROR = "OnSalePaymentCheckValidationError";
60
61 const EVENT_ON_TAX_GET_LIST = "OnSaleTaxGetList";
62
63 const ENTITY_COLLECTABLE_ENTITY = CollectableEntity::class;
64
65 const EVENT_ON_ORDER_BEFORE_ARCHIVED = "OnSaleOrderBeforeArchived";
66
67 const EVENT_ON_NEED_DELIVERY_RECIPIENT_CONTACT = "OnNeedDeliveryRecipientContact";
68
73 public static function getEventNotifyMap()
74 {
76
78 $orderEntity = $registry->getOrderClassName();
79
81 $shipmentEntity = $registry->getShipmentClassName();
82
84 $notifyEntity = $registry->getNotifyClassName();
85
86 return array(
87 static::EVENT_ON_ORDER_SAVED => array(
88 "ENTITY" => $orderEntity,
89 "METHOD" => array($notifyEntity, "sendOrderNew"),
90 ),
91 static::EVENT_ON_ORDER_CANCELED => array(
92 "ENTITY" => $orderEntity,
93 "METHOD" => array($notifyEntity, "sendOrderCancel"),
94 ),
95 static::EVENT_ON_ORDER_PAID => array(
96 "ENTITY" => $orderEntity,
97 "METHOD" => array($notifyEntity, "sendOrderPaid"),
98 ),
99
100 static::EVENT_ON_ORDER_STATUS_CHANGE => array(
101 "ENTITY" => $orderEntity,
102 "METHOD" => array($notifyEntity, "sendOrderStatusChange"),
103 ),
104 static::EVENT_ON_SHIPMENT_TRACKING_NUMBER_CHANGE => array(
105 "ENTITY" => $shipmentEntity,
106 "METHOD" => array($notifyEntity, "sendShipmentTrackingNumberChange"),
107 ),
108 static::EVENT_ON_SHIPMENT_ALLOW_DELIVERY => array(
109 "ENTITY" => $shipmentEntity,
110 "METHOD" => array($notifyEntity, "sendShipmentAllowDelivery"),
111 ),
112 static::EVENT_ON_SHIPMENT_STATUS_CHANGE => array(
113 "ENTITY" => $shipmentEntity,
114 "METHOD" => array($notifyEntity, "sendShipmentStatusChange"),
115 ),
116
117 static::EVENT_ON_ORDER_STATUS_ALLOW_PAY_CHANGE => array(
118 "ENTITY" => $orderEntity,
119 "METHOD" => array($notifyEntity, "sendOrderAllowPayStatusChange"),
120 ),
121
122 static::EVENT_ON_CHECK_PRINT => array(
123 "ENTITY" => static::ENTITY_COLLECTABLE_ENTITY,
124 "METHOD" => array($notifyEntity, "sendPrintableCheck"),
125 ),
126
127 static::EVENT_ON_CHECK_PRINT_ERROR => array(
128 "ENTITY" => static::ENTITY_COLLECTABLE_ENTITY,
129 "METHOD" => array($notifyEntity, "sendCheckError"),
130 ),
131
132 static::EVENT_ON_CHECK_VALIDATION_ERROR => array(
133 "ENTITY" => $orderEntity,
134 "METHOD" => array($notifyEntity, "sendCheckValidationError"),
135 ),
136
137 );
138 }
139
140}
const EVENT_ON_BEFORE_SHIPMENT_STATUS_CHANGE
const EVENT_ON_ORDER_STATUS_CHANGE_SEND_MAIL
const EVENT_ON_SHIPMENT_TRACKING_NUMBER_CHANGE
const EVENT_ON_ORDER_STATUS_ALLOW_PAY_CHANGE_SEND_MAIL
const EVENT_ON_ORDER_STATUS_ALLOW_PAY_CHANGE
const EVENT_ON_NEED_DELIVERY_RECIPIENT_CONTACT
const EVENT_ON_SHIPMENT_STATUS_CHANGE_SEND_MAIL
static getInstance($type)
Definition registry.php:183