public getCheapestEnabledVariation ( Sonata\Component\Product\ProductInterface $product ) : Sonata\Component\Product\ProductInterface | ||
$product | Sonata\Component\Product\ProductInterface | |
Результат | Sonata\Component\Product\ProductInterface |
public function getCheapestEnabledVariation(ProductInterface $product)
{
if (!$this->productPool->getProvider($product)->hasVariations($product)) {
return $product;
}
return $this->productPool->getProvider($product)->getCheapestEnabledVariation($product);
}