Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

ProductFamilySectionPropertyFactory.php 1.0KB

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