Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
checkTypeChange example
continue
;
}
if
(
$command
->
getDefinition
(
)
->
getClass
(
)
!== CategoryDefinition::
class
)
{
continue
;
}
if
(
!
isset
(
$command
->
getPayload
(
)
[
'type'
]
)
)
{
continue
;
}
$violationList
->
addAll
(
$this
->
checkTypeChange
(
$command
,
$event
)
)
;
}
if
(
$violationList
->
count
(
)
> 0
)
{
$event
->
getExceptions
(
)
->
add
(
new
WriteConstraintViolationException
(
$violationList
)
)
;
return
;
}
}
private
function
checkTypeChange
(
WriteCommand
$command
, PostWriteValidationEvent
$event
)
: ConstraintViolationListInterface
{