Browse Source

ProductFamilySolver : getFirstProductOnline()

develop
Guillaume Bourgeois 9 months ago
parent
commit
864f8db948
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      Solver/Product/ProductFamilySolver.php

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

return $productsOnlineArray; 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 public function getReductionCatalogInherited(ProductFamilyInterface $productFamily): ?ReductionCatalogInterface
{ {
return $productFamily->getReductionCatalog(); return $productFamily->getReductionCatalog();

Loading…
Cancel
Save