/** * @Route("/get-pricelist-currency-list/{id}", * name="orob2b_pricing_price_list_currency_list", * requirements={"id"="\d+"}) * @AclAncestor("orob2b_product_update") * * @param PriceList $priceList * @return JsonResponse */ public function getPriceListCurrencyList(PriceList $priceList) { $currencyNames = Intl::getCurrencyBundle()->getCurrencyNames($this->get('oro_locale.settings')->getLocale()); $currencies = array_intersect_key($currencyNames, array_fill_keys($priceList->getCurrencies(), null)); return new JsonResponse($currencies); }