Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
validateSyncOperationInput example
$writes
=
[
]
;
$notFound
=
[
]
;
$deletes
=
[
]
;
foreach
(
$operations
as
$operation
)
{
if
(
!
$operation
instanceof SyncOperation
)
{
continue
;
}
$this
->
validateSyncOperationInput
(
$operation
)
;
$definition
=
$this
->registry->
getByEntityName
(
$operation
->
getEntity
(
)
)
;
$this
->
validateWriteInput
(
$operation
->
getPayload
(
)
)
;
if
(
$operation
->
getAction
(
)
=== SyncOperation::ACTION_DELETE
)
{
$deletes
[
]
=
$this
->factory->
resolveDelete
(
$definition
,
$operation
->
getPayload
(
)
)
;
$notFound
[
]
=
$this
->
extractDeleteCommands
(
$definition
,
$operation
->
getPayload
(
)
,
$context
,
$commandQueue
)
;
continue
;
}