Ver código fonte

ProductFamilySolver : getFirstProductOnline()

develop
Guillaume Bourgeois 9 meses atrás
pai
commit
864f8db948
1 arquivos alterados com 10 adições e 0 exclusões
  1. +10
    -0
      Solver/Product/ProductFamilySolver.php

+ 10
- 0
Solver/Product/ProductFamilySolver.php Ver arquivo

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

Carregando…
Cancelar
Salvar