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.

31 rinda
781B

  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Product;
  3. use App\Entity\Product\ProductFamily;
  4. use Lc\CaracoleBundle\Factory\SectionFactoryTrait;
  5. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  6. use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
  7. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  8. use Lc\SovBundle\Factory\AbstractFactory;
  9. class ProductFamilyFactory extends AbstractFactory
  10. {
  11. use SectionFactoryTrait;
  12. public function create(SectionInterface $section = null): ProductFamilyInterface
  13. {
  14. $productFamily = new ProductFamily();
  15. if(is_null($section)) {
  16. $productFamily->setSection($this->section);
  17. }else{
  18. $productFamily->setSection($section);
  19. }
  20. return $productFamily;
  21. }
  22. }