CoolCMS API

ItemAvailability
in package

FinalYes

Availability snapshot of a stock item across warehouses — read model returned by {@see \App\UI\Api\Store\Models\Services\StockReader}. Value object (no DI — the `*DTO*` folder mask in config/common.neon keeps it out of the container scan).

infoText / attributeClass (the availability semaphore) are the caller's concern — it looks them up from the labelWarehouseId warehouse.

Table of Contents

Properties

$available  : string
$deliveryDays  : int|null
$inStock  : bool
$labelWarehouseId  : int|null
$perWarehouse  : array<string|int, mixed>
$quantity  : string
$reserved  : string
$stockItemId  : int

Methods

__construct()  : mixed

Properties

$perWarehouse read-only

public array<string|int, mixed> $perWarehouse = []

Methods

__construct()

public __construct(int $stockItemId, string $quantity, string $reserved, string $available, bool $inStock, int|null $deliveryDays, int|null $labelWarehouseId[, array<int, WarehouseAvailability> $perWarehouse = [] ]) : mixed
Parameters
$stockItemId : int
$quantity : string
$reserved : string
$available : string
$inStock : bool
$deliveryDays : int|null
$labelWarehouseId : int|null
$perWarehouse : array<int, WarehouseAvailability> = []
On this page

Search results