public function disableCurrencyAction(CurrencyInterface $currency)
{
$translator = $this->get('translator');
/**
* We cannot disable the default currency
*/
$masterCurrency = $configManager = $this->get('elcodi.store')->getDefaultCurrency();
if ($currency->getIso() == $masterCurrency) {
throw new HttpException('403', $translator->trans('admin.currency.error.disable_master_currency'));
}
$this->disableEntity($currency);
return ['message' => $translator->trans('admin.currency.saved.disabled')];
}