/**
* {@inheritdoc}
*/
public function find(array $items, $locale)
{
if (0 === count($items)) {
return [];
}
$result = [];
list($sortedIds, $positions) = $this->sortItems($items);
foreach ($sortedIds as $type => $typeIds) {
$teasers = $this->providerPool->getProvider($type)->find($typeIds, $locale);
$result = $this->sortTeasers($teasers, $result, $positions, $items);
}
ksort($result);
return array_values($result);
}