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.
|
- <?php
-
- namespace Lc\CaracoleBundle\Factory\Product;
-
- use App\Entity\Product\ProductFamily;
- use Lc\CaracoleBundle\Factory\SectionFactoryTrait;
- use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
- use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
- use Lc\CaracoleBundle\Model\Section\SectionInterface;
- use Lc\SovBundle\Factory\AbstractFactory;
-
- class ProductFamilyFactory extends AbstractFactory
- {
-
- use SectionFactoryTrait;
-
- public function create(SectionInterface $section = null): ProductFamilyInterface
- {
- $productFamily = new ProductFamily();
-
- if(is_null($section)) {
- $productFamily->setSection($this->section);
- }else{
- $productFamily->setSection($section);
- }
-
- return $productFamily;
- }
-
- }
|