$result =
new ProductSearchResult( [$product->
getNumber() =>
$product],
1,
[],
$criteria,
$this->contextService->
getShopContext() );
$service->
updatePrices($criteria,
$result,
$this->contextService->
getShopContext());
if ($product->
displayFromPrice()) { $data['priceStartingFrom'
] =
$product->
getListingPrice()->
getCalculatedPrice();
} $data['price'
] =
$product->
getListingPrice()->
getCalculatedPrice();
return $this->legacyEventManager->
fireArticleByIdEvents($data,
$this);
} /**
* Creates different links for the product like `add to basket`, `add to note`, `view detail page`, ...
*
* @param int $categoryId
* @param bool $addNumber
*
* @return array
*/