public function iterate(?array
$offset): ?EntityIndexingMessage
{ $iterator =
$this->iteratorFactory->
createIterator($this->repository->
getDefinition(),
$offset);
$ids =
$iterator->
fetch();
if (empty($ids)) { return null;
} return new RuleIndexingMessage(array_values($ids),
$iterator->
getOffset());
} public function update(EntityWrittenContainerEvent
$event): ?EntityIndexingMessage
{ $updates =
$event->
getPrimaryKeys(RuleDefinition::ENTITY_NAME
);
if (empty($updates)) { return null;
} $this->
handle(new RuleIndexingMessage(array_values($updates), null,
$event->
getContext()));