Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isIndexedEntityWritten example
$this
->dispatcher->
dispatch
(
new
ProgressAdvancedEvent
(
\
count
(
$ids
)
)
)
;
}
$this
->dispatcher->
dispatch
(
new
ProgressFinishedEvent
(
$indexer
->
getName
(
)
)
)
;
}
$this
->
swapAlias
(
$indices
)
;
}
public
function
refresh
(
EntityWrittenContainerEvent
$event
)
: void
{
if
(
!
$this
->adminEsHelper->
getEnabled
(
)
|| !
$this
->
isIndexedEntityWritten
(
$event
)
)
{
return
;
}
if
(
$this
->adminEsHelper->
getRefreshIndices
(
)
)
{
$this
->
refreshIndices
(
)
;
}
/** @var array<string, string> $indices */
$indices
=
$this
->connection->
fetchAllKeyValue
(
'SELECT `alias`, `index` FROM admin_elasticsearch_index_task'
)
;
if
(
empty
(
$indices
)
)
{