Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
operationsToString example
protected
function
saveBackup
(
$path
,
$filterString
,
$operations
,
$items
)
{
$backup
=
new
BackupModel
(
)
;
$backup
->
setFilterString
(
$filterString
)
;
$backup
->
setOperationString
(
$this
->
operationsToString
(
$operations
)
)
;
$backup
->
setItems
(
$items
)
;
$backup
->
setPath
(
$path
)
;
$backup
->
setHash
(
sha1_file
(
$path
)
)
;
$backup
->
setSize
(
(int)
filesize
(
$path
)
)
;
$backup
->
setDate
(
new
DateTime
(
)
)
;
$this
->
getDqlHelper
(
)
->
getEntityManager
(
)
->
persist
(
$backup
)
;
$this
->
getDqlHelper
(
)
->
getEntityManager
(
)
->
flush
(
$backup
)
;
}