Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
validateRatingValue example
throw
RoutingException::
invalidRequestParameter
(
'authorName'
)
;
}
if
(
!\
is_string
(
$headline
)
||
$headline
=== ''
)
{
throw
RoutingException::
invalidRequestParameter
(
'headline'
)
;
}
if
(
!\
is_int
(
$rating
)
|| !
$rating
)
{
throw
RoutingException::
invalidRequestParameter
(
'rating'
)
;
}
if
(
self::
validateRatingValue
(
$rating
)
)
{
throw
new
InvalidExtensionRatingValueException
(
$rating
)
;
}
if
(
!\
is_string
(
$version
)
||
$version
=== ''
)
{
throw
RoutingException::
invalidRequestParameter
(
'version'
)
;
}
$data
=
[
'extensionId' =>
$extensionId
,
'authorName' =>
$authorName
,
'headline' =>
$headline
,