$searchResults =
$this->
fetchByCriteria($searches,
$resolverContext->
getSalesChannelContext());
// create result for each slot with the requested data
foreach ($slots as $slotId =>
$slot) { $resolver =
$this->resolvers
[$slot->
getType()] ?? null;
if (!
$resolver) { continue;
} $result =
new ElementDataCollection();
$this->
mapSearchResults($result,
$slot,
$slotCriteriaList,
$searchResults);
$this->
mapEntities($result,
$slot,
$slotCriteriaList,
$entities);
$resolver->
enrich($slot,
$resolverContext,
$result);
// replace with return value from enrich(), because it's allowed to change the entity type
$slots->
set($slotId,
$slot);
} return $slots;
}