$this->
addAclPermission('deletePayment', 'delete', "You're not allowed to delete the payment."
);
} /**
* Main-Method to get all payments and its countries and subshops
* The data is additionally formatted, so additional-information are also given
*/
public function getPaymentsAction() { $this->repository =
$this->
get('models'
)->
getRepository(Payment::
class);
$query =
$this->repository->
getListQuery(null,
[ ['property' => 'payment.active', 'direction' => 'DESC'
],
['property' => 'payment.position'
],
]);
$results =
$query->
getArrayResult();
// Translate payments
// The standard $translationComponent->translatePayments can not be used here since the
// description may not be overridden. The field is edible and if the translation is
// shown in the edit field, there is a high chance of a user saving the translation as description.
$translator =
$this->
get(Shopware_Components_Translation::
class)->
getObjectTranslator('config_payment'
);
$results =
array_map(function D
$payment) use ($translator) {