Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
MediaFolderConfigurationIndexerEvent example
$this
->connection,
$this
->connection->
prepare
(
'UPDATE media_folder_configuration SET media_thumbnail_sizes_ro = :media_thumbnail_sizes_ro WHERE id = :id'
)
)
;
foreach
(
$configs
as
$config
)
{
$update
->
execute
(
[
'media_thumbnail_sizes_ro' =>
serialize
(
$config
->
getMediaThumbnailSizes
(
)
)
,
'id' => Uuid::
fromHexToBytes
(
$config
->
getId
(
)
)
,
]
)
;
}
$this
->eventDispatcher->
dispatch
(
new
MediaFolderConfigurationIndexerEvent
(
$ids
,
$context
,
$message
->
getSkip
(
)
)
)
;
}
public
function
getTotal
(
)
: int
{
return
$this
->iteratorFactory->
createIterator
(
$this
->repository->
getDefinition
(
)
)
->
fetchCount
(
)
;
}
public
function
getDecorated
(
)
: EntityIndexer
{
throw
new
DecorationPatternException
(
static
::
class
)
;
}
}