StatInterface ​
- Type
- Interface
- Namespace
- craft\commerce\base
- Implemented by
- craft\commerce\base\Stat, craft\commerce\stats\AverageOrderTotal, craft\commerce\stats\NewCustomers, craft\commerce\stats\RepeatCustomers, craft\commerce\stats\TopCustomers, craft\commerce\stats\TopProductTypes, craft\commerce\stats\TopProducts, craft\commerce\stats\TopPurchasables, craft\commerce\stats\TotalOrders, craft\commerce\stats\TotalOrdersByCountry, craft\commerce\stats\TotalRevenue
- Since
- 3.0
Stat Interface
Public Methods ​
Method | Description |
---|---|
get() | |
getData() | |
getDateRangeWording() | |
getEndDate() | |
getHandle() | |
getOrderStatuses() | |
getStartDate() | |
prepareData() | |
setEndDate() | |
setOrderStatuses() | Set order statuses to limit stat query. Accepts array of OrderStatus models, handle strings or uid strings. |
setStartDate() |
get()
​
Returns ​
mixed
getData()
​
Returns ​
mixed
getDateRangeWording()
​
getEndDate()
​
Returns ​
mixed
getHandle()
​
getOrderStatuses()
​
- Since
- 4.2.0
Returns ​
getStartDate()
​
Returns ​
mixed
prepareData()
​
Arguments ​
$data
(mixed
)
Returns ​
mixed
setEndDate()
​
Arguments ​
$date
setOrderStatuses()
​
- Since
- 4.2.0
Set order statuses to limit stat query. Accepts array of OrderStatus
models, handle strings or uid strings.
Arguments ​
$orderStatuses
(craft\commerce\models\OrderStatus[], string[], null)
Returns ​
void
setStartDate()
​
Arguments ​
$date