OnGetSellingUnitAvailableQuantityListener
extends AbstractPrioritizedEventListener
in package
Class OnGetSellingUnitAvailableQuantityListener
Table of Contents
- PRIORITY = self::PRIORITY_LOW
- $service : ReaderServiceInterface
- $allowCheckout : bool
- $GM_ORDER_STOCK_CHECKER_NO_STOCK_CANT_CHECKOUT : string
- $GM_ORDER_STOCK_CHECKER_OUT_OF_STOCK_CAN_CHECKOUT : string
- $GM_ORDER_STOCK_CHECKER_OUT_OF_STOCK_CANT_CHECKOUT : string
- __construct() : mixed
- OnGetSellingUnitAvailableQuantityListener constructor.
- __invoke() : OnGetSellingUnitAvailableQuantityEventInterface
- priority() : int
- Returns the priority of this event listener. The higher the returned value, the earlier it will be executed.
- addExceptionToRequested() : mixed
Constants
PRIORITY
public
mixed
PRIORITY
= self::PRIORITY_LOW
Properties
$service
protected
ReaderServiceInterface
$service
$allowCheckout
private
bool
$allowCheckout
$GM_ORDER_STOCK_CHECKER_NO_STOCK_CANT_CHECKOUT
private
string
$GM_ORDER_STOCK_CHECKER_NO_STOCK_CANT_CHECKOUT
$GM_ORDER_STOCK_CHECKER_OUT_OF_STOCK_CAN_CHECKOUT
private
string
$GM_ORDER_STOCK_CHECKER_OUT_OF_STOCK_CAN_CHECKOUT
$GM_ORDER_STOCK_CHECKER_OUT_OF_STOCK_CANT_CHECKOUT
private
string
$GM_ORDER_STOCK_CHECKER_OUT_OF_STOCK_CANT_CHECKOUT
Methods
__construct()
OnGetSellingUnitAvailableQuantityListener constructor.
public
__construct(ReaderServiceInterface $service, bool $allowCheckout, string $GM_ORDER_STOCK_CHECKER_OUT_OF_STOCK_CAN_CHECKOUT, string $GM_ORDER_STOCK_CHECKER_OUT_OF_STOCK_CANT_CHECKOUT, string $GM_ORDER_STOCK_CHECKER_NO_STOCK_CANT_CHECKOUT) : mixed
Parameters
- $service : ReaderServiceInterface
- $allowCheckout : bool
- $GM_ORDER_STOCK_CHECKER_OUT_OF_STOCK_CAN_CHECKOUT : string
- $GM_ORDER_STOCK_CHECKER_OUT_OF_STOCK_CANT_CHECKOUT : string
- $GM_ORDER_STOCK_CHECKER_NO_STOCK_CANT_CHECKOUT : string
Return values
mixed —__invoke()
public
__invoke(OnGetSellingUnitAvailableQuantityEventInterface $event) : OnGetSellingUnitAvailableQuantityEventInterface
Parameters
Return values
OnGetSellingUnitAvailableQuantityEventInterface —priority()
Returns the priority of this event listener. The higher the returned value, the earlier it will be executed.
public
priority() : int
Tags
Return values
int —addExceptionToRequested()
private
addExceptionToRequested(ProductId $productId, ModifierQuantityInterface $quantity, QuantityInterface $requested) : mixed
Parameters
- $productId : ProductId
- $quantity : ModifierQuantityInterface
- $requested : QuantityInterface