Skip to content
For AI agents: the complete documentation index is available at llms.txt; this page is also available as Markdown at index.md.

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
 8
 9
10
11
12
use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery;

$criteria = null;

$orderQuery = new OrderQuery(
    $criteria,
    [
        new \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Created(
            \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Created::SORT_ASC
        ),
    ]
);