Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getBacklogKey example
$em
=
$eventArgs
->
getEntityManager
(
)
;
$uow
=
$em
->
getUnitOfWork
(
)
;
$queue
=
[
]
;
// Entity deletions
foreach
(
$uow
->
getScheduledEntityDeletions
(
)
as
$entity
)
{
$backlog
=
$this
->
getBacklog
(
$entity
)
;
if
(
!
$backlog
)
{
continue
;
}
$queue
[
$this
->
getBacklogKey
(
$backlog
)
]
=
$backlog
;
}
// Entity Insertions
foreach
(
$uow
->
getScheduledEntityInsertions
(
)
as
$entity
)
{
$backlog
=
$this
->
getBacklog
(
$entity
)
;
if
(
!
$backlog
||
$backlog
->entity_id === null
)
{
continue
;
}
$queue
[
$this
->
getBacklogKey
(
$backlog
)
]
=
$backlog
;
}