Beispiel #1
0
 /**
  * {@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);
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function getDefaultParams(PropertyInterface $property = null)
 {
     return ['providerConfiguration' => $this->teaserProviderPool->getConfiguration(), 'present_as' => new PropertyParameter('present_as', [], 'collection')];
 }