| Total Complexity | 6 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 13 | class LineItemAddedEvent extends Event /*implements ShopwareSalesChannelEvent*/ |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var LineItem |
||
| 17 | */ |
||
| 18 | protected $lineItem; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var Cart |
||
| 22 | */ |
||
| 23 | protected $cart; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var SalesChannelContext |
||
| 27 | */ |
||
| 28 | protected $context; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var bool |
||
| 32 | */ |
||
| 33 | protected $merged; |
||
| 34 | |||
| 35 | public function __construct(LineItem $lineItem, Cart $cart, SalesChannelContext $context, bool $merged = false) |
||
| 36 | { |
||
| 37 | $this->lineItem = $lineItem; |
||
| 38 | $this->cart = $cart; |
||
| 39 | $this->context = $context; |
||
| 40 | $this->merged = $merged; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function getLineItem(): LineItem |
||
| 44 | { |
||
| 45 | return $this->lineItem; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function getCart(): Cart |
||
| 49 | { |
||
| 50 | return $this->cart; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @deprecated tag:v6.4.0 - Will return Shopware\Core\Framework\Context instead |
||
| 55 | */ |
||
| 56 | public function getContext(): SalesChannelContext |
||
| 59 | } |
||
| 60 | |||
| 61 | public function getSalesChannelContext(): SalesChannelContext |
||
| 64 | } |
||
| 65 | |||
| 66 | public function isMerged(): bool |
||
| 69 | } |
||
| 70 | } |
||
| 71 |