Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assignTemplateDocuments example
if
(
$entry
->
getOrder
(
)
!== null
)
{
$mail
->
setAssociation
(
LogEntryBuilder::ORDER_ASSOCIATION,
$entry
->
getOrder
(
)
)
;
}
if
(
$entry
->
getShop
(
)
!== null
)
{
$mail
->
setAssociation
(
LogEntryBuilder::SHOP_ASSOCIATION,
$entry
->
getShop
(
)
)
;
}
$this
->
assignOrderDocuments
(
$entry
,
$mail
)
;
$this
->
assignTemplateDocuments
(
$entry
,
$mail
)
;
return
$mail
;
}
protected
function
assignOrderDocuments
(
Log
$logEntry
, Enlight_Components_Mail
$mail
)
: void
{
if
(
$logEntry
->
getDocuments
(
)
->
isEmpty
(
)
)
{
return
;
}
foreach
(
$logEntry
->
getDocuments
(
)
as
$document
)
{