$sorting =
new FieldSorting('points', 'DESC'
);
} $criteria->
addSorting($sorting);
if ($request->
get('language'
) === self::FILTER_LANGUAGE
) { $criteria->
addPostFilter( new EqualsFilter('languageId',
$context->
getContext()->
getLanguageId()) );
} $this->
handlePointsAggregation($request,
$criteria,
$context);
return $criteria;
} /**
* get review by productId and customer
* a customer should only create one review per product, so if there are more than one
* review we only take one
*
* @throws InconsistentCriteriaIdsException
*/