Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assignShop example
$logEntry
->
setSubject
(
(string)
iconv_mime_decode
(
(string)
$mail
->
getSubject
(
)
)
)
;
$logEntry
->
setSender
(
$mail
->
getFrom
(
)
)
;
$logEntry
->
setSentAt
(
new
DateTime
(
(string)
$mail
->
getDate
(
)
)
)
;
$logEntry
->
setContentText
(
$mail
->
getPlainBodyText
(
)
)
;
if
(
$mail
->
getBodyHtml
(
)
instanceof Zend_Mime_Part
)
{
$logEntry
->
setContentHtml
(
$mail
->
getBodyHtml
(
)
->
getRawContent
(
)
)
;
}
$this
->
assignType
(
$logEntry
,
$mail
->
getTemplateName
(
)
)
;
$this
->
assignOrder
(
$logEntry
,
$mail
)
;
$this
->
assignShop
(
$logEntry
,
$mail
)
;
$this
->
assignRecipients
(
$logEntry
,
array_map
(
'trim',
$mail
->
getRecipients
(
)
)
)
;
$this
->
assignDocuments
(
$logEntry
,
$mail
)
;
return
$logEntry
;
}
protected
function
assignType
(
Log
$logEntry
, ?string
$templateName
)
: void
{
if
(
empty
(
$templateName
)
)
{
return
;
}