Sfoglia il codice sorgente

ProductFamilySolver : getFirstProductOnline()

develop
Guillaume Bourgeois 9 mesi fa
parent
commit
864f8db948
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. +10
    -0
      Solver/Product/ProductFamilySolver.php

+ 10
- 0
Solver/Product/ProductFamilySolver.php Vedi File

@@ -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();

Loading…
Annulla
Salva