// Get total result of the query
$total =
$this->
get('models'
)->
getQueryCount($query);
// Select all shop as array
$data =
$query->
getArrayResult();
// Translate payments
/** @var Shopware_Components_Translation $translationComponent */
$translationComponent =
$this->
get(Shopware_Components_Translation::
class);
$data =
$translationComponent->
translatePaymentMethods($data);
// Return the data and total count
$this->
View()->
assign(['success' => true, 'data' =>
$data, 'total' =>
$total]);
} /**
* Returns a list of customer groups. Supports store paging, sorting and filtering over the standard ExtJs store parameters.
* Each customer group has the following fields:
* <code>
* [int] id
* [string] key
* [string] description
* [int] tax
* [int] taxInput
* [int] mode
* </code>
*/