PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.4
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.4
1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk 1.2.0 All 47 releases
fluent-cart / app / Events / Order / OrderDeleting.php

OrderDeleting.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.6.4, at app/Events/Order/OrderDeleting.php

53 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCart\App\Events\Order;
4
5 use FluentCart\App\Events\EventDispatcher;
6 use FluentCart\App\Listeners;
7 use FluentCart\App\Models\Order;
8
9 class OrderDeleting extends EventDispatcher
10 {
11 public string $hook = 'fluent_cart/order_before_delete';
12
13 protected array $listeners = [
14 Listeners\Order\OrderDeleting::class
15 ];
16
17 public Order $order;
18
19 public array $connectedOrderIds;
20
21 public bool $isTestMode;
22
23 public string $type;
24
25 public function __construct(Order $order, $connectedOrderIds = [], bool $isTestMode = false, string $type = '')
26 {
27 $this->order = $order;
28 $this->connectedOrderIds = $connectedOrderIds ?? [];
29 $this->isTestMode = $isTestMode;
30 $this->type = $type;
31 }
32
33 public function toArray(): array
34 {
35 return [
36 'order' => $this->order,
37 'connected_order_ids' => $this->connectedOrderIds,
38 'is_test_mode' => $this->isTestMode,
39 'type' => $this->type
40 ];
41 }
42
43 public function getActivityEventModel()
44 {
45 return $this->order;
46 }
47
48 public function shouldCreateActivity(): bool
49 {
50 return false;
51 }
52 }
53