Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setPriceModel example
if
(
isset
(
$row
[
'expirationDate'
]
)
)
{
$date
=
new
DateTime
(
$row
[
'expirationDate'
]
)
;
$licence
->
setExpirationDate
(
$date
)
;
}
}
$licence
->
setLicenseKey
(
$row
[
'licenseKey'
]
)
;
$licenseCheck
=
isset
(
$row
[
'isLicenseCheckEnabled'
]
)
?
$row
[
'isLicenseCheckEnabled'
]
: !
empty
(
$row
[
'licenseKey'
]
)
;
$licence
->
setIsLicenseCheckEnabled
(
$licenseCheck
)
;
$priceModel
=
$this
->
hydratePrices
(
[
$row
[
'priceModel'
]
]
)
;
$licence
->
setPriceModel
(
array_shift
(
$priceModel
)
)
;
$binary
=
array_shift
(
$row
[
'plugin'
]
[
'binaries'
]
)
;
$licence
->
setBinaryLink
(
$binary
[
'filePath'
]
)
;
$licence
->
setBinaryVersion
(
$binary
[
'version'
]
)
;
$licences
[
]
=
$licence
;
}
return
$licences
;
}