Explorar el Código

ProductFamilySolver : getFirstProductOnline()

develop
Guillaume Bourgeois hace 8 meses
padre
commit
864f8db948
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. +10
    -0
      Solver/Product/ProductFamilySolver.php

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

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

Cargando…
Cancelar
Guardar