Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
MediaFolderCollection example
$parent
->
setUpdatedAt
(
new
\
DateTime
(
'2017-11-21T11:25:34.000+00:00'
)
)
;
$parent
->
internalSetEntityData
(
'media_folder',
new
FieldVisibility
(
[
]
)
)
;
$child
=
new
MediaFolderEntity
(
)
;
$child
->
setId
(
'5846dd97529c0f6b5448713e352be2d8'
)
;
$child
->
setChildCount
(
1
)
;
$child
->
setUseParentConfiguration
(
true
)
;
$child
->
setParentId
(
'3e352be2d85846dd97529c0f6b544870'
)
;
$child
->
setCreatedAt
(
new
\
DateTime
(
'2012-08-15T00:00:00.000+00:00'
)
)
;
$child
->
setUpdatedAt
(
new
\
DateTime
(
'2017-11-21T11:25:34.000+00:00'
)
)
;
$child
->
internalSetEntityData
(
'media_folder',
new
FieldVisibility
(
[
]
)
)
;
$parent
->
setChildren
(
new
MediaFolderCollection
(
[
$child
]
)
)
;
return
new
MediaFolderCollection
(
[
$parent
]
)
;
}
/** * @return array<string, mixed> */
protected
function
getJsonApiFixtures
(
string
$baseUrl
)
: array
{
return
[
'data' =>
[
[