You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ProductFamilySectionPropertySolver.php 759B

пре 3 година
пре 3 година
пре 2 година
пре 3 година
пре 2 година
пре 3 година
пре 3 година
12345678910111213141516171819202122232425
  1. <?php
  2. namespace Lc\CaracoleBundle\Solver\Product;
  3. use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
  4. use Lc\CaracoleBundle\Model\Product\ProductFamilySectionPropertyInterface;
  5. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  6. class ProductFamilySectionPropertySolver
  7. {
  8. public function getProductFamilySectionProperty(ProductFamilyInterface $productFamily, SectionInterface $section):? ProductFamilySectionPropertyInterface
  9. {
  10. foreach ($productFamily->getProductFamilySectionProperties() as $productFamilySectionProperty) {
  11. if ($productFamilySectionProperty->getSection()->getId() == $section->getId()) {
  12. return $productFamilySectionProperty;
  13. }
  14. }
  15. return null;
  16. }
  17. }