$builder->
addOrderBy($property['property'
],
$property['direction'
]);
} $builder->
setFirstResult($this->
Request()->
getParam('start'
)) ->
setMaxResults($this->
Request()->
getParam('limit'
)) ->
orderBy('details.id', 'ASC'
);
$result =
$builder->
execute()->
fetchAll(PDO::FETCH_ASSOC
);
$total =
(int) $builder->
getConnection()->
fetchColumn('SELECT FOUND_ROWS()'
);
$result =
$this->
addAdditionalTextForVariant($result);
foreach ($result as $index =>
$variant) { $result[$index]['price'
] =
round($variant['price'
] / 100 *
(100 +
$variant['tax'
]), 2
);
} $this->
View()->
assign(['success' => true, 'data' =>
$result, 'total' =>
$total]);
} /**
* Returns a list of all backend-users. Supports store paging, sorting and filtering over the standard ExtJs store parameters.
* Each user has the following fields:
* <code>
* [int] id
* [int] roleId
* [string] username
* [string] password
* [int] localeId
* [string] sessionId
* [date] lastLogin
* [string] name
* [string] email
* [int] active
* [int] failedLogins
* [date] lockedUntil
* </code>
*/