@@ -3,15 +3,20 @@ | |||
namespace Lc\CaracoleBundle\Factory\Address; | |||
use App\Entity\Address\Address; | |||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||
use Lc\CaracoleBundle\Model\Address\AddressInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
class AddressFactory extends AbstractFactory implements AddressFactoryInterface | |||
{ | |||
use MerchantFactoryTrait; | |||
public function create(): AddressInterface | |||
{ | |||
$address = new Address(); | |||
$address->setMerchant($this->merchant); | |||
return $address; | |||
} | |||
@@ -3,15 +3,23 @@ | |||
namespace Lc\CaracoleBundle\Factory\Order; | |||
use App\Entity\Order\OrderShop; | |||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||
use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | |||
use Lc\CaracoleBundle\Model\Order\OrderShopInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
class OrderShopFactory extends AbstractFactory implements OrderShopFactoryInterface | |||
{ | |||
use MerchantFactoryTrait; | |||
use SectionFactoryTrait; | |||
public function create(): OrderShopInterface | |||
{ | |||
$orderShop = new OrderShop(); | |||
$orderShop->setMerchant($this->merchant); | |||
$orderShop->setSection($this->section); | |||
return $orderShop; | |||
} | |||
@@ -3,15 +3,20 @@ | |||
namespace Lc\CaracoleBundle\Factory\PointSale; | |||
use App\Entity\PointSale\PointSale; | |||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||
use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
class PointSaleFactory extends AbstractFactory implements PointSaleFactoryInterface | |||
{ | |||
use MerchantFactoryTrait; | |||
public function create(): PointSaleInterface | |||
{ | |||
$pointSale = new PointSale(); | |||
$pointSale->addMerchant($this->merchant); | |||
return $pointSale; | |||
} | |||
@@ -3,15 +3,23 @@ | |||
namespace Lc\CaracoleBundle\Factory\Product; | |||
use App\Entity\Product\ProductCategory; | |||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||
use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | |||
use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
class ProductCategoryFactory extends AbstractFactory implements ProductCategoryFactoryInterface | |||
{ | |||
use MerchantFactoryTrait; | |||
use SectionFactoryTrait; | |||
public function create(): ProductCategoryInterface | |||
{ | |||
$productCategory = new ProductCategory(); | |||
$productCategory->setMerchant($this->merchant); | |||
$productCategory->setSection($this->section); | |||
return $productCategory; | |||
} | |||
@@ -3,15 +3,23 @@ | |||
namespace Lc\CaracoleBundle\Factory\Product; | |||
use App\Entity\Product\ProductFamily; | |||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||
use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | |||
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
class ProductFamilyFactory extends AbstractFactory implements ProductFamilyFactoryInterface | |||
{ | |||
use MerchantFactoryTrait; | |||
use SectionFactoryTrait; | |||
public function create(): ProductFamilyInterface | |||
{ | |||
$productFamily = new ProductFamily(); | |||
$productFamily->setMerchant($this->merchant); | |||
$productFamily->setSection($this->section); | |||
return $productFamily; | |||
} | |||
@@ -3,15 +3,20 @@ | |||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||
use App\Entity\Reduction\ReductionCart; | |||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
class ReductionCartFactory extends AbstractFactory implements ReductionCartFactoryInterface | |||
{ | |||
use MerchantFactoryTrait; | |||
public function create(): ReductionCartInterface | |||
{ | |||
$reductionCart = new ReductionCart(); | |||
$reductionCart->setMerchant($this->merchant); | |||
return $reductionCart; | |||
} | |||
@@ -3,15 +3,20 @@ | |||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||
use App\Entity\Reduction\ReductionCatalog; | |||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCatalogInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
class ReductionCatalogFactory extends AbstractFactory implements ReductionCatalogFactoryInterface | |||
{ | |||
use MerchantFactoryTrait; | |||
public function create(): ReductionCatalogInterface | |||
{ | |||
$reductionCatalog = new ReductionCatalog(); | |||
$reductionCatalog->setMerchant($this->merchant); | |||
return $reductionCatalog; | |||
} | |||
@@ -3,15 +3,20 @@ | |||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||
use App\Entity\Reduction\ReductionCredit; | |||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
class ReductionCreditFactory extends AbstractFactory implements ReductionCreditFactoryInterface | |||
{ | |||
use MerchantFactoryTrait; | |||
public function create(): ReductionCreditInterface | |||
{ | |||
$reductionCredit = new ReductionCredit(); | |||
$reductionCredit->setMerchant($this->merchant); | |||
return $reductionCredit; | |||
} | |||
@@ -3,15 +3,21 @@ | |||
namespace Lc\CaracoleBundle\Factory\Section; | |||
use App\Entity\Section\Section; | |||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||
use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
class SectionFactory extends AbstractFactory implements SectionFactoryInterface | |||
{ | |||
use MerchantFactoryTrait; | |||
public function create(): SectionInterface | |||
{ | |||
$section = new Section(); | |||
$section->setMerchant($this->merchant); | |||
return $section; | |||
} | |||
@@ -17,6 +17,7 @@ class PageFactory extends SovPageFactory | |||
$page = parent::create(); | |||
$page->setMerchant($this->merchant); | |||
$page->setSection($this->section); | |||
return $page; | |||
} |
@@ -3,15 +3,20 @@ | |||
namespace Lc\CaracoleBundle\Factory\User; | |||
use App\Entity\User\GroupUser; | |||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\User\GroupUserInterface; | |||
class GroupUserFactory extends AbstractFactory implements GroupUserFactoryInterface | |||
{ | |||
use MerchantFactoryTrait; | |||
public function create(): GroupUserInterface | |||
{ | |||
$groupUser = new GroupUser(); | |||
$groupUser->setMerchant($this->merchant); | |||
return $groupUser; | |||
} | |||