protected function getLocaleCurrency(Request $request)
    {
        $currentLocale = $request->getLocale();
        $locale        = $this->container->get('locale.repository')->findOneBy(['code' => $currentLocale]);

        if (null !== $locale && $locale->getCurrency() instanceof Currency) {
            return $locale->getCurrency()->getCode();
        }

        return null;
    }
protected function getLocaleCurrency(Request $request)
    {
        $currentLocale = $request->getLocale();
        $locale        = $this->container->get('locale.repository')->findOneBy(['code' => $currentLocale]);

        if (null !== $locale && $locale->getCurrency() instanceof Currency) {
            return $locale->getCurrency()->getCode();
        }

        return null;
    }
protected function getLocaleCurrency ( Request $ request ) { $ currentLocale = $ request -> getLocale ( ) ; $ locale = $ this -> container -> get ( 'locale.repository' ) -> findOneBy ( [ 'code' => $ currentLocale ] ) ; if ( null !== $ locale && $ locale -> getCurrency ( ) instanceof Currency ) { return $ locale -> getCurrency ( ) -> getCode ( ) ; } return null ; }
Returns the currency code for active locale

@param Request $request

@return string
Returns the currency code for active locale