Copied!

BeforeMergeCartsEvent

BeforeMergeCartsEvent.php : 14
Extends BeforeEvent

Event emitted before action execution.

Methods

public__construct()

BeforeMergeCartsEvent.php : 23
public __construct(CartInterface $targetCart, bool $deleteMergedCarts, CartInterface ...$cartsToMerge)

Parameters

Name Type Default value Description
$targetCart CartInterface - -
$deleteMergedCarts bool - -
$cartsToMerge CartInterface - -

publicgetCartsToMerge()

BeforeMergeCartsEvent.php : 43
public getCartsToMerge() : array<string|int, CartInterface>

Return values

array<string|int, CartInterface>

publicgetDeleteMergedCarts()

BeforeMergeCartsEvent.php : 53
public getDeleteMergedCarts() : bool

Return values

bool

publicgetTargetCart()

BeforeMergeCartsEvent.php : 30
public getTargetCart() : CartInterface

Return values

CartInterface

publicisPropagationStopped()

Event.php : 38
public isPropagationStopped() : bool

Return values

bool

publicsetDeleteMergedCarts()

BeforeMergeCartsEvent.php : 58
public setDeleteMergedCarts(bool $deleteMergedCarts) : void

Parameters

Name Type Default value Description
$deleteMergedCarts bool - -

publicsetsCartToMerge()

BeforeMergeCartsEvent.php : 48
public setsCartToMerge(CartInterface ...$cartsToMerge) : void

Parameters

Name Type Default value Description
$cartsToMerge CartInterface - -

publicsetTargetCart()

BeforeMergeCartsEvent.php : 35
public setTargetCart(CartInterface $targetCart) : void

Parameters

Name Type Default value Description
$targetCart CartInterface - -

publicstopPropagation()

Event.php : 50

Stops the propagation of the event to further event listeners.

public stopPropagation() : void

If multiple event listeners are connected to the same event, no further event listener will be triggered once any trigger calls stopPropagation().