Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
MediaIndexerEvent example
->
getEntities
(
)
;
foreach
(
$ids
as
$id
)
{
$thumbnails
=
$all
->
filterByProperty
(
'mediaId',
$id
)
;
$query
->
execute
(
[
'thumbnails_ro' =>
serialize
(
$thumbnails
)
,
'id' => Uuid::
fromHexToBytes
(
$id
)
,
]
)
;
}
$this
->eventDispatcher->
dispatch
(
new
MediaIndexerEvent
(
$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
)
;
}
}