Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ProductFamilySectionPropertySolver.php 739B

1234567891011121314151617181920212223
  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() == $section) {
  12. return $productFamilySectionProperty;
  13. }
  14. }
  15. return null;
  16. }
  17. }