Преглед изворни кода

Factory : merchant & section

packProduct
Guillaume пре 2 година
родитељ
комит
4e4bf51f7e
11 измењених фајлова са 61 додато и 0 уклоњено
  1. +5
    -0
      Factory/Address/AddressFactory.php
  2. +8
    -0
      Factory/Order/OrderShopFactory.php
  3. +5
    -0
      Factory/PointSale/PointSaleFactory.php
  4. +8
    -0
      Factory/Product/ProductCategoryFactory.php
  5. +8
    -0
      Factory/Product/ProductFamilyFactory.php
  6. +5
    -0
      Factory/Reduction/ReductionCartFactory.php
  7. +5
    -0
      Factory/Reduction/ReductionCatalogFactory.php
  8. +5
    -0
      Factory/Reduction/ReductionCreditFactory.php
  9. +6
    -0
      Factory/Section/SectionFactory.php
  10. +1
    -0
      Factory/Site/PageFactory.php
  11. +5
    -0
      Factory/User/GroupUserFactory.php

+ 5
- 0
Factory/Address/AddressFactory.php Прегледај датотеку

@@ -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;
}


+ 8
- 0
Factory/Order/OrderShopFactory.php Прегледај датотеку

@@ -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;
}


+ 5
- 0
Factory/PointSale/PointSaleFactory.php Прегледај датотеку

@@ -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;
}


+ 8
- 0
Factory/Product/ProductCategoryFactory.php Прегледај датотеку

@@ -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;
}


+ 8
- 0
Factory/Product/ProductFamilyFactory.php Прегледај датотеку

@@ -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;
}


+ 5
- 0
Factory/Reduction/ReductionCartFactory.php Прегледај датотеку

@@ -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;
}


+ 5
- 0
Factory/Reduction/ReductionCatalogFactory.php Прегледај датотеку

@@ -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;
}


+ 5
- 0
Factory/Reduction/ReductionCreditFactory.php Прегледај датотеку

@@ -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;
}


+ 6
- 0
Factory/Section/SectionFactory.php Прегледај датотеку

@@ -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;
}


+ 1
- 0
Factory/Site/PageFactory.php Прегледај датотеку

@@ -17,6 +17,7 @@ class PageFactory extends SovPageFactory
$page = parent::create();

$page->setMerchant($this->merchant);
$page->setSection($this->section);

return $page;
}

+ 5
- 0
Factory/User/GroupUserFactory.php Прегледај датотеку

@@ -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;
}


Loading…
Откажи
Сачувај