/**
* Returns a list of orders for the passed customer id and filtered by the filter parameter.
*
* @param int $customerId
* @param int|null $limit
* @param int|null $offset
*
* @return Query<Order>
*/
public function getOrdersQuery($customerId,
$filter = null,
$orderBy = null,
$limit = null,
$offset = null
) { $builder =
$this->
getOrdersQueryBuilder($customerId,
$filter,
$orderBy);
if ($limit !== null
) { $builder->
setFirstResult($offset) ->
setMaxResults($limit);
} return $builder->
getQuery();
} /**
* Helper function to create the query builder for the "getOrdersQuery" function.
* This function can be hooked to modify the query builder of the query object.
*
* @param int $customerId
* @param string|null $filter
* @param array|null $orderBy
*
* @return QueryBuilder
*/