Bläddra i källkod

ProductFamilySolver : getFirstProductOnline()

develop
Guillaume Bourgeois 9 månader sedan
förälder
incheckning
864f8db948
1 ändrade filer med 10 tillägg och 0 borttagningar
  1. +10
    -0
      Solver/Product/ProductFamilySolver.php

+ 10
- 0
Solver/Product/ProductFamilySolver.php Visa fil

@@ -170,6 +170,16 @@ class ProductFamilySolver
return $productsOnlineArray;
}

public function getFirstProductOnline(ProductFamilyInterface $productFamily): ?ProductInterface
{
$productsOnlineArray = $this->getProductsOnline($productFamily);
if(count($productsOnlineArray) > 0) {
return $productsOnlineArray[0];
}

return null;
}

public function getReductionCatalogInherited(ProductFamilyInterface $productFamily): ?ReductionCatalogInterface
{
return $productFamily->getReductionCatalog();

Laddar…
Avbryt
Spara