->
orderBy('image.main'
) ->
addOrderBy('image.position'
) ->
setParameter(':products',
$ids, Connection::PARAM_INT_ARRAY
);
$data =
$query->
execute()->
fetchAll(PDO::FETCH_ASSOC
);
$result =
[];
foreach ($data as $row) { $productNumber =
(string) $row['number'
];
$imageId =
(int) $row['__image_id'
];
$result[$productNumber][$imageId] =
$this->hydrator->
hydrateProductImage($row);
} return $result;
} /**
* {@inheritdoc}
*/
public function getCovers($products, ShopContextInterface
$context) { $ids =
[];