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.

29 lines
911B

  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Product;
  3. use App\Entity\Product\ProductFamilySectionProperty;
  4. use Lc\CaracoleBundle\Container\Product\ProductFamilySectionPropertyContainer;
  5. use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
  6. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  7. use Lc\SovBundle\Factory\AbstractFactory;
  8. class ProductFamilySectionPropertyFactory extends AbstractFactory
  9. {
  10. public function create(SectionInterface $section, ProductFamilyInterface $productFamily): ProductFamilySectionProperty
  11. {
  12. $class = ProductFamilySectionPropertyContainer::getEntityFqcn();
  13. $productFamilySectionProperty = new $class;
  14. $productFamilySectionProperty->setSection($section);
  15. $productFamilySectionProperty->setProductFamily($productFamily);
  16. $productFamilySectionProperty->setStatus(0);
  17. return $productFamilySectionProperty;
  18. }
  19. }