Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assignDocuments example
$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
;
}
$type
=
$this
->mailRepository->
findOneBy
(
[
'name' =>
$templateName
]
)
;