- <?php
-
- namespace Lc\CaracoleBundle\Factory\Product;
-
- use Lc\CaracoleBundle\Container\Product\ProductCategoryContainer;
- use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface;
- use Lc\CaracoleBundle\Model\Section\SectionInterface;
- use Lc\SovBundle\Factory\AbstractFactory;
-
- class ProductCategoryFactory extends AbstractFactory
- {
- public function create(SectionInterface $section): ProductCategoryInterface
- {
- $class = ProductCategoryContainer::getEntityFqcn();
- $productCategory = new $class;
-
- $productCategory->setSection($section);
- $productCategory->setSaleStatus(true);
- $productCategory->setStatus(1);
-
- return $productCategory;
- }
- }
|