Skip to content

Order Created Sort Clause

The Created Sort Clause sorts search results by the date and time when the order was created.

Arguments

  • (optional) sortDirection - Created constant, either Created::SORT_ASC or Created::SORT_DESC

Example

1
2
3
4
5
6
7
$orderQuery = new OrderQuery(
    $criteria,
    [
        new \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Created(
            \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Created::SORT_ASC)
    ]
);