$builder->
leftJoin('payment.ruleSets', 'ruleSets'
);
$builder->
orderBy('payment.active', 'desc'
);
$builder->
addOrderBy('payment.id'
);
$result =
$builder->
getQuery()->
getArrayResult();
$total =
$this->
get('models'
)->
getQueryCount($builder->
getQuery());
// Translate the payment methods
$translationComponent =
$this->
get(Shopware_Components_Translation::
class);
$result =
$translationComponent->
translatePaymentMethods($result);
$this->
View()->
assign(['success' => true, 'data' =>
$result, 'total' =>
$total]);
} catch (Exception
$e) { $this->
View()->
assign(['success' => false, 'errorMsg' =>
$e->
getMessage()]);
} } /**
* Function to delete a single rule.
* It is called, when the user clicks on the delete button of a rule.
*/
public function deleteRuleAction() {