Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
resolveDelete example
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
;
}
if
(
$operation
->
getAction
(
)
=== SyncOperation::ACTION_UPSERT
)
{
$parameters
=
new
WriteParameterBag
(
$definition
,
$context
, '',
$commandQueue
)
;
$payload
=
$this
->commandExtractor->
normalize
(
$definition
,
$operation
->
getPayload
(
)
,
$parameters
)
;
$this
->gateway->
prefetchExistences
(
$parameters
)
;