|
|
@@ -5,6 +5,7 @@ namespace Lc\CaracoleBundle\Solver\Product; |
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
|
|
|
use Doctrine\Common\Collections\Collection; |
|
|
|
use Lc\CaracoleBundle\Doctrine\Extension\ProductPropertyInterface; |
|
|
|
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; |
|
|
|
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface; |
|
|
|
use Lc\CaracoleBundle\Model\Product\ProductFamilyModel; |
|
|
|
use Lc\CaracoleBundle\Model\Product\ProductInterface; |
|
|
@@ -467,6 +468,15 @@ class ProductFamilySolver |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
public function getMerchant(ProductFamilyInterface $productFamily): ?MerchantInterface |
|
|
|
{ |
|
|
|
foreach ($productFamily->getProductFamilySectionProperties() as $productFamilySectionProperty) { |
|
|
|
return $productFamilySectionProperty->getSection()->getMerchant(); |
|
|
|
} |
|
|
|
|
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
public function isInSection(ProductFamilyInterface $productFamily, SectionInterface $section): bool |
|
|
|
{ |
|
|
|
foreach ($productFamily->getProductFamilySectionProperties() as $productFamilySectionProperty) { |