getMessageParameters example

foreach ($errors as $error) {
            if (!$error instanceof FormError) {
                continue;
            }
            $message = Shopware()->Template()->fetch('string:' . $error->getMessage());

            $origin = $error->getOrigin();
            $violations[] = new ConstraintViolation(
                $message,
                $error->getMessageTemplate(),
                $error->getMessageParameters(),
                $origin ? $origin->getRoot() : null,
                $origin ? (string) $origin->getPropertyPath() : null,
                $origin ? $origin->getData() : null,
                $error->getMessagePluralization(),
                null,
                null,
                $error->getCause()
            );
        }

        return new self(new ConstraintViolationList($violations));
    }
Home | Imprint | This part of the site doesn't use cookies.