->
setMaxResults($limit);
/** @var Query<array<string, mixed>> $query */
$query =
$builder->
getQuery();
$query->
setHydrationMode(AbstractQuery::HYDRATE_ARRAY
);
$paginator =
$this->
getModelManager()->
createPaginator($query);
$total =
$paginator->
count();
$orders =
iterator_to_array($paginator);
// Translate payment and dispatch method names.
$translationComponent =
$this->
get(Shopware_Components_Translation::
class);
$orders =
$translationComponent->
translateOrders($orders);
$this->
View()->
assign([ 'success' => true,
'data' =>
$orders,
'total' =>
$total,
]);
} /**
* Delete an order
*
* @return void
*/