Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
validDeleteCase example
if
(
!
$this
->
validInsertCase
(
$channel
)
)
{
$inserts
[
$id
]
=
$channel
[
'new_default'
]
;
}
$duplicatedIds
=
$this
->
getDuplicates
(
$channel
)
;
if
(
$duplicatedIds
)
{
$duplicates
[
$id
]
=
$duplicatedIds
;
}
}
if
(
isset
(
$channel
[
'deletions'
]
)
&& !
$this
->
validDeleteCase
(
$channel
)
)
{
$deletions
[
$id
]
=
$channel
[
'current_default'
]
;
}
if
(
isset
(
$channel
[
'updates'
]
)
&& !
$this
->
validUpdateCase
(
$channel
)
)
{
$updates
[
$id
]
=
$channel
[
'updates'
]
;
}
}
$this
->
writeInsertViolationExceptions
(
$inserts
,
$event
)
;
$this
->
writeDuplicateViolationExceptions
(
$duplicates
,
$event
)
;
$this
->
writeDeleteViolationExceptions
(
$deletions
,
$event
)
;