PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.3.21
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.3.21
1.6.5 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 All 48 releases
fluent-cart / app / Events / StockChanged.php

StockChanged.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.3.21, at app/Events/StockChanged.php

48 lines 911 B
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;
4
5 use FluentCart\App\Listeners\UpdateDefaultVariation;
6
7 class StockChanged extends EventDispatcher
8 {
9 public string $hook = 'fluent_cart/product_stock_changed';
10 protected array $listeners = [
11 //UpdateDefaultVariation::class
12 ];
13
14 /**
15 * @var $postIds array
16 */
17 public $postIds;
18
19 /**
20 * @var $otherInfo array|null
21 */
22 public ?array $otherInfo;
23
24 public function __construct($postIds, $otherInfo = null)
25 {
26 $this->postIds = $postIds;
27 $this->otherInfo = $otherInfo;
28 }
29
30 public function toArray(): array
31 {
32 return [
33 'post_ids' => $this->postIds,
34 'other_info' => $this->otherInfo,
35 ];
36 }
37
38 public function getActivityEventModel()
39 {
40 return null;
41 }
42
43 public function shouldCreateActivity(): bool
44 {
45 return false;
46 }
47
48 }