Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setDetail example
$entityManager
->
clear
(
)
;
/** @var QueueModel $queue */
$queue
=
$entityManager
->
getReference
(
QueueModel::
class
,
$queueId
)
;
}
/** @var Detail $detail */
$detail
=
$entityManager
->
getReference
(
\Shopware\Models\Article\Detail::
class
,
$detailId
)
;
$model
=
new
QueueArticle
(
)
;
$model
->
setQueue
(
$queue
)
;
$model
->
setDetail
(
$detail
)
;
$entityManager
->
persist
(
$model
)
;
}
$done
=
(
$offset
+
$limit
)
>=
$totalCount
;
// When done, set the queue to active and finish the backup
if
(
$done
)
{
$queue
->
setActive
(
true
)
;
$timestamp
=
$queue
->
getCreated
(
)
?
$queue
->
getCreated
(
)
->
getTimestamp
(
)
: null;
$this
->
getBackupResource
(
)
->
finishBackup
(
$filterString
,
$operations
,
$queue
->
getInitialSize
(
)
,
$timestamp
)
;
}