|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getProductCategoryChild(ProductFamilyInterface $productFamily) |
|
|
|
|
|
|
|
|
public function getProductCategoryChild(ProductFamilyInterface $productFamily, SectionInterface $section) |
|
|
{ |
|
|
{ |
|
|
$productCategories = $productFamily->getProductCategories(); |
|
|
$productCategories = $productFamily->getProductCategories(); |
|
|
|
|
|
|
|
|
foreach ($productCategories as $productCategory) { |
|
|
foreach ($productCategories as $productCategory) { |
|
|
if ($productCategory->getParent()) { |
|
|
|
|
|
|
|
|
if ($productCategory->getParent() && $productCategory->getSection() == $section) { |
|
|
return $productCategory; |
|
|
return $productCategory; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |