Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
MailTemplateMediaEntity example
$this
->documentGenerator,
$this
->connection
)
;
}
public
function
testBuildTemplateMediaAttachments
(
)
: void
{
$context
= Context::
createDefaultContext
(
)
;
$mailTemplate
=
new
MailTemplateEntity
(
)
;
$extension
=
new
MailSendSubscriberConfig
(
false
)
;
$mediaA
=
new
MailTemplateMediaEntity
(
)
;
$mediaA
->
setId
(
Uuid::
randomHex
(
)
)
;
$mediaA
->
setMedia
(
new
MediaEntity
(
)
)
;
$mediaA
->
setLanguageId
(
$context
->
getLanguageId
(
)
)
;
$mediaB
=
new
MailTemplateMediaEntity
(
)
;
$mediaB
->
setId
(
Uuid::
randomHex
(
)
)
;
$mediaC
=
new
MailTemplateMediaEntity
(
)
;
$mediaC
->
setId
(
Uuid::
randomHex
(
)
)
;
$mediaC
->
setMedia
(
new
MediaEntity
(
)
)
;
$mediaC
->
setLanguageId
(
$context
->
getLanguageId
(
)
)
;
$mailTemplate
->
setMedia
(
new
MailTemplateMediaCollection
(
[
$mediaA
,
$mediaB
,
$mediaC
]
)
)
;