src/Backend/Modules/Commerce/Form/DataTransformer/MoneyToLocalizedStringTransformer.php
/**
     * Transforms a localized money string into a normalized format.
     */
Transforms a localized money string into a normalized format.
Transforms a localized money string into a normalized format .
public function reverseTransform($value): Money
    {
        $value = parent::reverseTransform((string) $value);
        $moneyParser = new DecimalMoneyParser($this->currencies);
        try {
            return $moneyParser->parse(sprintf('%.53f', $value), $this->currency);
        } catch (ParserException $e) {
            throw new TransformationFailedException($e->getMessage());
        }
    }
public function reverseTransform ( $ value ) : Money { $ value = parent :: reverseTransform ( ( string ) $ value ) ; $ moneyParser = new DecimalMoneyParser ( $ this -> currencies ) ; try { return $ moneyParser -> parse ( sprintf ( '%.53f' , $ value ) , $ this -> currency ) ; } catch ( ParserException $ e ) { throw new TransformationFailedException ( $ e -> getMessage ( ) ) ; } }
Transforms a localized money string into a normalized format.
Transforms a localized money string into a normalized format .