Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setFailed example
$executeInserts
=
function
D
)
use
(
$mappings
,
$inserts
)
: void
{
$mappings
->
execute
(
)
;
$inserts
->
execute
(
)
;
}
;
try
{
foreach
(
$commands
as
$command
)
{
if
(
!
$command
->
isValid
(
)
)
{
continue
;
}
$command
->
setFailed
(
false
)
;
$current
=
$command
->
getDefinition
(
)
->
getEntityName
(
)
;
if
(
$current
!==
$previous
)
{
$executeInserts
(
)
;
}
$previous
=
$current
;
try
{
$definition
=
$command
->
getDefinition
(
)
;
$table
=
$definition
->
getEntityName
(
)
;