浏览代码

ProductFamilySolver : getFirstProductOnline()

develop
Guillaume Bourgeois 9 个月前
父节点
当前提交
864f8db948
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. +10
    -0
      Solver/Product/ProductFamilySolver.php

+ 10
- 0
Solver/Product/ProductFamilySolver.php 查看文件

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

正在加载...
取消
保存