src/Frontend/Modules/Commerce/Ajax/ProductPrice.php
/**
     * Convert the errors to an array which can be used in the frontend.
     */
Convert the errors to an array which can be used in the frontend.
Convert the errors to an array which can be used in the frontend .
private function buildErrors(FormErrorIterator $errors): array
    {
        $errorMessages = [];
        foreach ($errors as $key => $error) {
            $errorMessages[$error->getOrigin()->getName()] = $error->getMessage();
        }
        return $errorMessages;
    }
private function buildErrors ( FormErrorIterator $ errors ) : array { $ errorMessages = [ ] ; foreach ( $ errors as $ key => $ error ) { $ errorMessages [ $ error -> getOrigin ( ) -> getName ( ) ] = $ error -> getMessage ( ) ; } return $ errorMessages ; }
Convert the errors to an array which can be used in the frontend.
Convert the errors to an array which can be used in the frontend .
/**
         * @var FormError $error
         */