Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
validateRules example
break
;
case
AbsolutePriceDefinition::TYPE:
$this
->
validateProperties
(
$value
,
AbsolutePriceDefinition::
getConstraints
(
)
,
$parameters
->
getPath
(
)
)
;
if
(
!\
array_key_exists
(
'filter',
$value
)
||
$value
[
'filter'
]
=== null
)
{
break
;
}
$violations
=
$this
->
validateRules
(
$value
[
'filter'
]
,
$parameters
->
getPath
(
)
. '/filter'
)
;
if
(
$violations
->
count
(
)
> 0
)
{
throw
new
WriteConstraintViolationException
(
$violations
,
$parameters
->
getPath
(
)
)
;
}
break
;
case
CurrencyPriceDefinition::TYPE:
$this
->
validateProperties
(
$value
,
CurrencyPriceDefinition::
getConstraints
(
)
,
$parameters
->
getPath
(
)
)
;