$collection =
$resolver->
collect($slot,
$resolverContext);
if ($collection === null
) { continue;
} $slotCriteriaList[$slot->
getUniqueIdentifier()] =
$collection;
} // reduce search requests by combining mergeable criteria objects
[$directReads,
$searches] =
$this->
optimizeCriteriaObjects($slotCriteriaList);
// fetch data from storage
$entities =
$this->
fetchByIdentifier($directReads,
$resolverContext->
getSalesChannelContext());
$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;
}