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