Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createThumbnailsForSizes example
$this
->thumbnailRepository->
delete
(
$delete
,
$context
)
;
}
$updates
=
[
]
;
foreach
(
$generate
as
$media
)
{
if
(
$media
->
getMediaFolder
(
)
=== null ||
$media
->
getMediaFolder
(
)
->
getConfiguration
(
)
=== null
)
{
continue
;
}
$config
=
$media
->
getMediaFolder
(
)
->
getConfiguration
(
)
;
$thumbnails
=
$this
->
createThumbnailsForSizes
(
$media
,
$config
,
$config
->
getMediaThumbnailSizes
(
)
)
;
foreach
(
$thumbnails
as
$thumbnail
)
{
$updates
[
]
=
$thumbnail
;
}
}
if
(
empty
(
$updates
)
)
{
return
0;
}
$context
->
scope
(
Context::SYSTEM_SCOPE,
function
D
$context
)
use
(
$updates
)
: void
{