Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getMessagePluralization example
$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
)
)
;
}
}