@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Address; | |||
use App\Entity\Address\Address; | |||
use Lc\CaracoleBundle\Builder\Address\AddressBuilder; | |||
use Lc\CaracoleBundle\Factory\Address\AddressFactory; | |||
use Lc\CaracoleBundle\Repository\Address\AddressRepositoryQuery; | |||
@@ -30,6 +31,11 @@ class AddressContainer | |||
$this->builder = $builder; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Address::class; | |||
} | |||
public function getFactory(): AddressFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Config; | |||
use App\Entity\Config\TaxRate; | |||
use Lc\CaracoleBundle\Factory\Config\TaxRateFactory; | |||
use Lc\CaracoleBundle\Repository\Config\TaxRateRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Config\TaxRateStore; | |||
@@ -22,6 +23,12 @@ class TaxRateContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return TaxRate::class; | |||
} | |||
public function getFactory(): TaxRateFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Config; | |||
use App\Entity\Config\Unit; | |||
use Lc\CaracoleBundle\Factory\Config\UnitFactory; | |||
use Lc\CaracoleBundle\Repository\Config\UnitRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Config\UnitStore; | |||
@@ -22,6 +23,11 @@ class UnitContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Unit::class; | |||
} | |||
public function getFactory(): UnitFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Credit; | |||
use App\Entity\Credit\CreditHistory; | |||
use Lc\CaracoleBundle\Builder\Credit\CreditHistoryBuilder; | |||
use Lc\CaracoleBundle\Definition\Field\Credit\CreditHistoryFieldDefinition; | |||
use Lc\CaracoleBundle\Factory\Credit\CreditHistoryFactory; | |||
@@ -34,6 +35,11 @@ class CreditHistoryContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return CreditHistory::class; | |||
} | |||
public function getFactory(): CreditHistoryFactory | |||
{ | |||
return $this->factory; |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Distribution; | |||
use App\Entity\Distribution\Distribution; | |||
use Lc\CaracoleBundle\Builder\Distribution\DistributionBuilder; | |||
use Lc\CaracoleBundle\Factory\Distribution\DistributionFactory; | |||
use Lc\CaracoleBundle\Repository\Distribution\DistributionRepositoryQuery; | |||
@@ -31,6 +32,11 @@ class DistributionContainer | |||
$this->builder = $builder; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Distribution::class; | |||
} | |||
public function getFactory(): DistributionFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\File; | |||
use App\Entity\File\Document; | |||
use Lc\CaracoleBundle\Factory\File\DocumentFactory; | |||
use Lc\CaracoleBundle\Generator\DocumentReferenceGenerator; | |||
use Lc\CaracoleBundle\Repository\File\DocumentRepositoryQuery; | |||
@@ -26,6 +27,11 @@ class DocumentContainer | |||
$this->referenceGenerator = $referenceGenerator; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Document::class; | |||
} | |||
public function getFactory(): DocumentFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Merchant; | |||
use App\Entity\Merchant\Merchant; | |||
use Lc\CaracoleBundle\Builder\Merchant\MerchantBuilder; | |||
use Lc\CaracoleBundle\Factory\Merchant\MerchantFactory; | |||
use Lc\CaracoleBundle\Repository\Merchant\MerchantRepositoryQuery; | |||
@@ -35,6 +36,12 @@ class MerchantContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Merchant::class; | |||
} | |||
public function getFactory(): MerchantFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Order; | |||
use App\Entity\Order\OrderPayment; | |||
use Lc\CaracoleBundle\Factory\Order\OrderPaymentFactory; | |||
use Lc\CaracoleBundle\Repository\Order\OrderPaymentRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Order\OrderPaymentStore; | |||
@@ -22,6 +23,11 @@ class OrderPaymentContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return OrderPayment::class; | |||
} | |||
public function getFactory(): OrderPaymentFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Order; | |||
use App\Entity\Order\OrderProduct; | |||
use Lc\CaracoleBundle\Builder\Order\OrderProductBuilder; | |||
use Lc\CaracoleBundle\Factory\Order\OrderProductFactory; | |||
use Lc\CaracoleBundle\Repository\Order\OrderProductRepositoryQuery; | |||
@@ -30,6 +31,11 @@ class OrderProductContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return OrderProduct::class; | |||
} | |||
public function getFactory(): OrderProductFactory | |||
{ | |||
return $this->factory; | |||
@@ -54,4 +60,4 @@ class OrderProductContainer | |||
{ | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Order; | |||
use App\Entity\Order\OrderProductReductionCatalog; | |||
use Lc\CaracoleBundle\Factory\Order\OrderProductReductionCatalogFactory; | |||
use Lc\CaracoleBundle\Repository\Order\OrderProductReductionCatalogRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Order\OrderProductReductionCatalogStore; | |||
@@ -26,6 +27,12 @@ class OrderProductReductionCatalogContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return OrderProductReductionCatalog::class; | |||
} | |||
public function getFactory(): OrderProductReductionCatalogFactory | |||
{ | |||
return $this->factory; | |||
@@ -46,4 +53,4 @@ class OrderProductReductionCatalogContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Order; | |||
use App\Entity\Order\OrderProductRefund; | |||
use Lc\CaracoleBundle\Factory\Order\OrderProductRefundFactory; | |||
use Lc\CaracoleBundle\Repository\Order\OrderProductRefundRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Order\OrderProductRefundStore; | |||
@@ -22,6 +23,11 @@ class OrderProductRefundContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return OrderProductRefund::class; | |||
} | |||
public function getFactory(): OrderProductRefundFactory | |||
{ | |||
return $this->factory; | |||
@@ -37,4 +43,4 @@ class OrderProductRefundContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,8 @@ | |||
namespace Lc\CaracoleBundle\Container\Order; | |||
use App\Entity\Newsletter\Newsletter; | |||
use App\Entity\Order\OrderReductionCart; | |||
use Lc\CaracoleBundle\Factory\Order\OrderReductionCartFactory; | |||
use Lc\CaracoleBundle\Repository\Order\OrderReductionCartRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Order\OrderReductionCartStore; | |||
@@ -22,6 +24,12 @@ class OrderReductionCartContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return OrderReductionCart::class; | |||
} | |||
public function getFactory(): OrderReductionCartFactory | |||
{ | |||
return $this->factory; | |||
@@ -37,4 +45,4 @@ class OrderReductionCartContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Order; | |||
use App\Entity\Order\OrderReductionCredit; | |||
use Lc\CaracoleBundle\Factory\Order\OrderReductionCreditFactory; | |||
use Lc\CaracoleBundle\Repository\Order\OrderReductionCreditRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Order\OrderReductionCreditStore; | |||
@@ -22,6 +23,12 @@ class OrderReductionCreditContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return OrderReductionCredit::class; | |||
} | |||
public function getFactory(): OrderReductionCreditFactory | |||
{ | |||
return $this->factory; | |||
@@ -37,4 +44,4 @@ class OrderReductionCreditContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Order; | |||
use App\Entity\Order\OrderRefund; | |||
use Lc\CaracoleBundle\Factory\Order\OrderRefundFactory; | |||
use Lc\CaracoleBundle\Repository\Order\OrderRefundRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Order\OrderRefundStore; | |||
@@ -22,6 +23,11 @@ class OrderRefundContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return OrderRefund::class; | |||
} | |||
public function getFactory(): OrderRefundFactory | |||
{ | |||
return $this->factory; | |||
@@ -37,4 +43,4 @@ class OrderRefundContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Order; | |||
use App\Entity\Order\OrderShop; | |||
use App\Resolver\OrderShopResolver; | |||
use Lc\CaracoleBundle\Builder\Order\OrderShopBuilder; | |||
use Lc\CaracoleBundle\Definition\Field\Order\OrderShopFieldDefinition; | |||
@@ -42,6 +43,11 @@ class OrderShopContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return OrderShop::class; | |||
} | |||
public function getFactory(): OrderShopFactory | |||
{ | |||
return $this->factory; | |||
@@ -84,4 +90,4 @@ class OrderShopContainer | |||
return $this->fieldDefinition; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Order; | |||
use App\Entity\Order\OrderStatus; | |||
use Lc\CaracoleBundle\Factory\Order\OrderStatusFactory; | |||
use Lc\CaracoleBundle\Repository\Order\OrderStatusRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Order\OrderStatusStore; | |||
@@ -22,6 +23,11 @@ class OrderStatusContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return OrderStatus::class; | |||
} | |||
public function getFactory(): OrderStatusFactory | |||
{ | |||
return $this->factory; | |||
@@ -37,4 +43,4 @@ class OrderStatusContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Order; | |||
use App\Entity\Order\OrderStatusHistory; | |||
use Lc\CaracoleBundle\Factory\Order\OrderStatusHistoryFactory; | |||
use Lc\CaracoleBundle\Repository\Order\OrderStatusHistoryRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Order\OrderStatusHistoryStore; | |||
@@ -22,6 +23,11 @@ class OrderStatusHistoryContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return OrderStatusHistory::class; | |||
} | |||
public function getFactory(): OrderStatusHistoryFactory | |||
{ | |||
return $this->factory; | |||
@@ -37,4 +43,4 @@ class OrderStatusHistoryContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\PointSale; | |||
use App\Entity\PointSale\PointSale; | |||
use Lc\CaracoleBundle\Definition\Field\PointSale\PointSaleFieldDefinition; | |||
use Lc\CaracoleBundle\Factory\PointSale\PointSaleFactory; | |||
use Lc\CaracoleBundle\Repository\PointSale\PointSaleRepositoryQuery; | |||
@@ -30,6 +31,10 @@ class PointSaleContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return PointSale::class; | |||
} | |||
public function getFactory(): PointSaleFactory | |||
{ | |||
return $this->factory; | |||
@@ -56,4 +61,4 @@ class PointSaleContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\PointSale; | |||
use App\Entity\PointSale\PointSaleSection; | |||
use Lc\CaracoleBundle\Builder\PointSale\PointSaleSectionBuilder; | |||
use Lc\CaracoleBundle\Factory\PointSale\PointSaleSectionFactory; | |||
use Lc\CaracoleBundle\Repository\PointSale\PointSaleSectionRepositoryQuery; | |||
@@ -26,6 +27,11 @@ class PointSaleSectionContainer | |||
$this->builder = $builder; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return PointSaleSection::class; | |||
} | |||
public function getFactory(): PointSaleSectionFactory | |||
{ | |||
return $this->factory; | |||
@@ -47,4 +53,4 @@ class PointSaleSectionContainer | |||
{ | |||
return $this->builder; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Product; | |||
use App\Entity\Product\ProductCategory; | |||
use Lc\CaracoleBundle\Builder\Product\ProductCategoryBuilder; | |||
use Lc\CaracoleBundle\Definition\Field\Product\ProductCategoryFieldDefinition; | |||
use Lc\CaracoleBundle\Factory\Product\ProductCategoryFactory; | |||
@@ -34,6 +35,11 @@ class ProductCategoryContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return ProductCategory::class; | |||
} | |||
public function getFactory(): ProductCategoryFactory | |||
{ | |||
return $this->factory; | |||
@@ -66,4 +72,4 @@ class ProductCategoryContainer | |||
return $this->fieldDefinition; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Product; | |||
use App\Entity\Product\Product; | |||
use Lc\CaracoleBundle\Factory\Product\ProductFactory; | |||
use Lc\CaracoleBundle\Repository\Product\ProductRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Product\ProductStore; | |||
@@ -26,6 +27,12 @@ class ProductContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Product::class; | |||
} | |||
public function getFactory(): ProductFactory | |||
{ | |||
return $this->factory; | |||
@@ -50,4 +57,4 @@ class ProductContainer | |||
} | |||
} |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Product; | |||
use App\Definition\Field\Product\ProductFamilyFieldDefinition; | |||
use App\Entity\Product\ProductFamily; | |||
use Lc\CaracoleBundle\Builder\Product\ProductFamilyBuilder; | |||
use Lc\CaracoleBundle\Factory\Product\ProductFamilyFactory; | |||
use Lc\CaracoleBundle\Repository\Product\ProductFamilyRepositoryQuery; | |||
@@ -38,6 +39,11 @@ class ProductFamilyContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return ProductFamily::class; | |||
} | |||
public function getFactory(): ProductFamilyFactory | |||
{ | |||
return $this->factory; |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Product; | |||
use App\Definition\Field\Product\ProductFamilyFieldDefinition; | |||
use App\Entity\Product\ProductFamilySectionProperty; | |||
use Lc\CaracoleBundle\Builder\Product\ProductFamilyBuilder; | |||
use Lc\CaracoleBundle\Builder\Product\ProductFamilySectionPropertyBuilder; | |||
use Lc\CaracoleBundle\Factory\Product\ProductFamilyFactory; | |||
@@ -37,6 +38,11 @@ class ProductFamilySectionPropertyContainer | |||
$this->builder = $builder; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return ProductFamilySectionProperty::class; | |||
} | |||
public function getFactory(): ProductFamilySectionPropertyFactory | |||
{ | |||
return $this->factory; |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Product; | |||
use Lc\CaracoleBundle\Factory\Product\QualityLabelFactory; | |||
use Lc\CaracoleBundle\Model\Product\QualityLabel; | |||
use Lc\CaracoleBundle\Repository\Product\QualityLabelRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Product\QualityLabelStore; | |||
@@ -22,6 +23,12 @@ class QualityLabelContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return QualityLabel::class; | |||
} | |||
public function getFactory(): QualityLabelFactory | |||
{ | |||
return $this->factory; | |||
@@ -37,4 +44,4 @@ class QualityLabelContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Reduction; | |||
use App\Entity\Reduction\ReductionCart; | |||
use Lc\CaracoleBundle\Definition\Field\Reduction\ReductionCartFieldDefinition; | |||
use Lc\CaracoleBundle\Factory\Reduction\ReductionCartFactory; | |||
use Lc\CaracoleBundle\Repository\Reduction\ReductionCartRepositoryQuery; | |||
@@ -26,6 +27,12 @@ class ReductionCartContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return ReductionCart::class; | |||
} | |||
public function getFactory(): ReductionCartFactory | |||
{ | |||
return $this->factory; | |||
@@ -47,4 +54,4 @@ class ReductionCartContainer | |||
{ | |||
return $this->fieldDefinition; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Reduction; | |||
use App\Entity\Reduction\ReductionCatalog; | |||
use Lc\CaracoleBundle\Definition\Field\Reduction\ReductionCatalogFieldDefinition; | |||
use Lc\CaracoleBundle\Factory\Reduction\ReductionCatalogFactory; | |||
use Lc\CaracoleBundle\Repository\Reduction\ReductionCatalogRepositoryQuery; | |||
@@ -26,6 +27,12 @@ class ReductionCatalogContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return ReductionCatalog::class; | |||
} | |||
public function getFactory(): ReductionCatalogFactory | |||
{ | |||
return $this->factory; | |||
@@ -48,4 +55,4 @@ class ReductionCatalogContainer | |||
return $this->fieldDefinition; | |||
} | |||
} | |||
} |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Reduction; | |||
use App\Definition\Field\Reduction\ReductionCreditFieldDefinition; | |||
use App\Entity\Reduction\ReductionCredit; | |||
use Lc\CaracoleBundle\Factory\Reduction\ReductionCreditFactory; | |||
use Lc\CaracoleBundle\Repository\Reduction\ReductionCreditRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Reduction\ReductionCreditStore; | |||
@@ -26,6 +27,12 @@ class ReductionCreditContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return ReductionCredit::class; | |||
} | |||
public function getFactory(): ReductionCreditFactory | |||
{ | |||
return $this->factory; | |||
@@ -46,4 +53,4 @@ class ReductionCreditContainer | |||
return $this->fieldDefinition; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Section; | |||
use App\Entity\Section\Opening; | |||
use Lc\CaracoleBundle\Factory\Section\OpeningFactory; | |||
use Lc\CaracoleBundle\Repository\Section\OpeningRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Section\OpeningStore; | |||
@@ -26,6 +27,12 @@ class OpeningContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Opening::class; | |||
} | |||
public function getFactory(): OpeningFactory | |||
{ | |||
return $this->factory; | |||
@@ -48,4 +55,4 @@ class OpeningContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Section; | |||
use App\Entity\Section\Section; | |||
use Lc\CaracoleBundle\Factory\Section\SectionFactory; | |||
use Lc\CaracoleBundle\Repository\Section\SectionRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\Section\SectionStore; | |||
@@ -30,6 +31,12 @@ class SectionContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Section::class; | |||
} | |||
public function getFactory(): SectionFactory | |||
{ | |||
return $this->factory; | |||
@@ -56,4 +63,4 @@ class SectionContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Setting; | |||
use App\Entity\Setting\MerchantSetting; | |||
use Lc\CaracoleBundle\Definition\MerchantSettingDefinition; | |||
use Lc\CaracoleBundle\Factory\Setting\MerchantSettingFactory; | |||
use Lc\CaracoleBundle\Repository\Setting\MerchantSettingRepositoryQuery; | |||
@@ -30,6 +31,12 @@ class MerchantSettingContainer | |||
$this->settingSolver = $settingSolver; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return MerchantSetting::class; | |||
} | |||
public function getFactory(): MerchantSettingFactory | |||
{ | |||
return $this->factory; | |||
@@ -57,4 +64,4 @@ class MerchantSettingContainer | |||
return $this->settingSolver; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\Setting; | |||
use App\Entity\Setting\SectionSetting; | |||
use Lc\CaracoleBundle\Definition\SectionSettingDefinition; | |||
use Lc\CaracoleBundle\Factory\Setting\SectionSettingFactory; | |||
use Lc\CaracoleBundle\Repository\Setting\SectionSettingRepositoryQuery; | |||
@@ -30,6 +31,12 @@ class SectionSettingContainer | |||
$this->settingSolver = $settingSolver; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return SectionSetting::class; | |||
} | |||
public function getFactory(): SectionSettingFactory | |||
{ | |||
return $this->factory; | |||
@@ -57,4 +64,4 @@ class SectionSettingContainer | |||
return $this->settingSolver; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\User; | |||
use App\Entity\User\UserMerchant; | |||
use Lc\CaracoleBundle\Builder\User\UserMerchantBuilder; | |||
use Lc\CaracoleBundle\Definition\Field\User\UserMerchantFieldDefinition; | |||
use Lc\CaracoleBundle\Factory\User\UserMerchantFactory; | |||
@@ -34,6 +35,11 @@ class UserMerchantContainer | |||
$this->fieldDefinition = $fieldDefinition; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return UserMerchant::class; | |||
} | |||
public function getFactory(): UserMerchantFactory | |||
{ | |||
return $this->factory; |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\User; | |||
use App\Entity\User\UserPointSale; | |||
use Lc\CaracoleBundle\Factory\User\UserPointSaleFactory; | |||
use Lc\CaracoleBundle\Repository\User\UserPointSaleRepositoryQuery; | |||
use Lc\CaracoleBundle\Repository\User\UserPointSaleStore; | |||
@@ -22,6 +23,11 @@ class UserPointSaleContainer | |||
$this->store = $store; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return UserPointSale::class; | |||
} | |||
public function getFactory(): UserPointSaleFactory | |||
{ | |||
return $this->factory; | |||
@@ -37,4 +43,4 @@ class UserPointSaleContainer | |||
return $this->store; | |||
} | |||
} | |||
} |
@@ -2,6 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Container\User; | |||
use App\Entity\User\Visitor; | |||
use Lc\CaracoleBundle\Builder\User\VisitorBuilder; | |||
use Lc\CaracoleBundle\Factory\User\VisitorFactory; | |||
use Lc\CaracoleBundle\Repository\User\VisitorRepositoryQuery; | |||
@@ -34,6 +35,12 @@ class VisitorContainer | |||
$this->builder = $builder; | |||
} | |||
public static function getEntityFqcn() | |||
{ | |||
return Visitor::class; | |||
} | |||
public function getFactory(): VisitorFactory | |||
{ | |||
return $this->factory; | |||
@@ -64,4 +71,4 @@ class VisitorContainer | |||
return $this->builder; | |||
} | |||
} | |||
} |
@@ -2,8 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Address; | |||
use App\Entity\Address\Address; | |||
use Lc\CaracoleBundle\Context\MerchantContextTrait; | |||
use Lc\CaracoleBundle\Container\Address\AddressContainer; | |||
use Lc\CaracoleBundle\Model\Address\AddressInterface; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -13,7 +12,8 @@ class AddressFactory extends AbstractFactory | |||
public function create(MerchantInterface $merchant): AddressInterface | |||
{ | |||
$address = new Address(); | |||
$class = AddressContainer::getEntityFqcn(); | |||
$address = new $class; | |||
$address->setMerchant($merchant); | |||
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Config; | |||
use App\Entity\Config\TaxRate; | |||
use Lc\CaracoleBundle\Container\Config\TaxRateContainer; | |||
use Lc\CaracoleBundle\Model\Config\TaxRateInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -10,7 +10,8 @@ class TaxRateFactory extends AbstractFactory | |||
{ | |||
public function create(): TaxRateInterface | |||
{ | |||
$taxRate = new TaxRate(); | |||
$class = TaxRateContainer::getEntityFqcn(); | |||
$taxRate = new $class; | |||
return $taxRate; | |||
} |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Config; | |||
use App\Entity\Config\Unit; | |||
use Lc\CaracoleBundle\Container\Config\UnitContainer; | |||
use Lc\CaracoleBundle\Model\Config\UnitInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -10,7 +10,8 @@ class UnitFactory extends AbstractFactory | |||
{ | |||
public function create(): UnitInterface | |||
{ | |||
$unit = new Unit(); | |||
$class = UnitContainer::getEntityFqcn(); | |||
$unit = new $class; | |||
return $unit; | |||
} |
@@ -2,11 +2,10 @@ | |||
namespace Lc\CaracoleBundle\Factory\Credit; | |||
use App\Entity\Credit\CreditHistory; | |||
use Lc\CaracoleBundle\Container\Credit\CreditHistoryContainer; | |||
use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface; | |||
use Lc\CaracoleBundle\Model\User\UserMerchantInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
class CreditHistoryFactory extends AbstractFactory | |||
{ | |||
@@ -22,7 +21,8 @@ class CreditHistoryFactory extends AbstractFactory | |||
public function createBase(UserMerchantInterface $userMerchant): CreditHistoryInterface | |||
{ | |||
$creditHistory = new CreditHistory(); | |||
$class = CreditHistoryContainer::getEntityFqcn(); | |||
$creditHistory = new $class; | |||
$creditHistory->setUserMerchant($userMerchant) ; | |||
return $creditHistory; |
@@ -2,16 +2,17 @@ | |||
namespace Lc\CaracoleBundle\Factory\Distribution; | |||
use App\Entity\Distribution\Distribution; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\CaracoleBundle\Container\Distribution\DistributionContainer; | |||
use Lc\CaracoleBundle\Model\Distribution\DistributionInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
class DistributionFactory extends AbstractFactory | |||
{ | |||
public function create(int $cycleNumber, int $year, string $cycleType):Distribution | |||
public function create(int $cycleNumber, int $year, string $cycleType):DistributionInterface | |||
{ | |||
$distribution = new Distribution(); | |||
$class = DistributionContainer::getEntityFqcn(); | |||
$distribution = new $class; | |||
$distribution->setCycleNumber($cycleNumber); | |||
$distribution->setCycleType($cycleType); |
@@ -2,21 +2,18 @@ | |||
namespace Lc\CaracoleBundle\Factory\File; | |||
use App\Entity\File\Document; | |||
use Lc\CaracoleBundle\Context\MerchantContextTrait; | |||
use Lc\CaracoleBundle\Model\Address\AddressInterface; | |||
use Lc\CaracoleBundle\Container\File\DocumentContainer; | |||
use Lc\CaracoleBundle\Model\File\DocumentInterface; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
class DocumentFactory extends AbstractFactory | |||
{ | |||
public function create(MerchantInterface $merchant, string $type): DocumentInterface | |||
{ | |||
$document = new Document(); | |||
$class = DocumentContainer::getEntityFqcn(); | |||
$document = new $class; | |||
$document->setMerchant($merchant); | |||
$document->setType($type); |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Merchant; | |||
use App\Entity\Merchant\Merchant; | |||
use Lc\CaracoleBundle\Container\Merchant\MerchantContainer; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -10,7 +10,8 @@ class MerchantFactory extends AbstractFactory | |||
{ | |||
public function create(): MerchantInterface | |||
{ | |||
$merchant = new Merchant(); | |||
$class = MerchantContainer::getEntityFqcn(); | |||
$merchant = new $class; | |||
$merchant->setStatus(1); | |||
@@ -2,7 +2,6 @@ | |||
namespace Lc\CaracoleBundle\Factory\Newsletter; | |||
use Lc\CaracoleBundle\Context\MerchantContextTrait; | |||
use Lc\CaracoleBundle\Context\SectionContextTrait; | |||
use Lc\SovBundle\Model\Newsletter\NewsletterInterface; | |||
use Lc\SovBundle\Factory\Newsletter\NewsletterFactory as SovNewsletterFactory; |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Order; | |||
use App\Entity\Order\OrderPayment; | |||
use Lc\CaracoleBundle\Container\Order\OrderPaymentContainer; | |||
use Lc\CaracoleBundle\Model\Order\OrderPaymentInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderShopInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -21,7 +21,8 @@ class OrderPaymentFactory extends AbstractFactory | |||
} | |||
public function createBase($orderShop){ | |||
$orderPayment = new OrderPayment(); | |||
$class = OrderPaymentContainer::getEntityFqcn(); | |||
$orderPayment = new $class; | |||
$orderPayment->setOrderShop($orderShop); | |||
return $orderPayment; | |||
} |
@@ -2,7 +2,8 @@ | |||
namespace Lc\CaracoleBundle\Factory\Order; | |||
use App\Entity\Order\OrderProduct; | |||
use Lc\CaracoleBundle\Container\Order\OrderProductContainer; | |||
use Lc\CaracoleBundle\Model\Order\OrderProductInterface; | |||
use Lc\CaracoleBundle\Model\Product\ProductInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -20,7 +21,8 @@ class OrderProductFactory extends AbstractFactory | |||
} | |||
public function createBase(){ | |||
return new OrderProduct(); | |||
$class = OrderProductContainer::getEntityFqcn(); | |||
return new $class; | |||
} | |||
} |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Order; | |||
use App\Entity\Order\OrderProductReductionCatalog; | |||
use Lc\CaracoleBundle\Container\Order\OrderProductReductionCatalogContainer; | |||
use Lc\CaracoleBundle\Model\Order\OrderProductReductionCatalogInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -10,7 +10,8 @@ class OrderProductReductionCatalogFactory extends AbstractFactory | |||
{ | |||
public function create(string $title, float $value, string $unit, string $behaviorTaxRate): OrderProductReductionCatalogInterface | |||
{ | |||
$orderProductReductionCatalog = new OrderProductReductionCatalog(); | |||
$class = OrderProductReductionCatalogContainer::getEntityFqcn(); | |||
$orderProductReductionCatalog = new $class; | |||
$orderProductReductionCatalog->setTitle($title); | |||
$orderProductReductionCatalog->setValue($value); |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Order; | |||
use App\Entity\Order\OrderProductRefund; | |||
use Lc\CaracoleBundle\Container\Order\OrderProductRefundContainer; | |||
use Lc\CaracoleBundle\Model\Order\OrderProductRefundInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -10,7 +11,8 @@ class OrderProductRefundFactory extends AbstractFactory | |||
{ | |||
public function create(): OrderProductRefundInterface | |||
{ | |||
$orderProductRefund = new OrderProductRefund(); | |||
$class = OrderProductRefundContainer::getEntityFqcn(); | |||
$orderProductRefund = new $class; | |||
return $orderProductRefund; | |||
} |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Order; | |||
use App\Entity\Order\OrderReductionCart; | |||
use Lc\CaracoleBundle\Container\Order\OrderReductionCartContainer; | |||
use Lc\CaracoleBundle\Model\Order\OrderReductionCartInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderShopInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface; | |||
@@ -13,7 +13,8 @@ class OrderReductionCartFactory extends AbstractFactory | |||
// createOrderReductionCart | |||
public function create(OrderShopInterface $orderShop, ReductionCartInterface $reductionCart, $code = null): OrderReductionCartInterface | |||
{ | |||
$orderReductionCart = new OrderReductionCart(); | |||
$class = OrderReductionCartContainer::getEntityFqcn(); | |||
$orderReductionCart = new $class; | |||
$orderReductionCart->setOrderShop($orderShop); | |||
$orderReductionCart->setReductionCart($reductionCart); |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Order; | |||
use App\Entity\Order\OrderReductionCredit; | |||
use Lc\CaracoleBundle\Container\Order\OrderReductionCreditContainer; | |||
use Lc\CaracoleBundle\Model\Order\OrderReductionCreditInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderShopInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface; | |||
@@ -12,7 +12,8 @@ class OrderReductionCreditFactory extends AbstractFactory | |||
{ | |||
public function create(OrderShopInterface $orderShop, ReductionCreditInterface $reductionCredit): OrderReductionCreditInterface | |||
{ | |||
$orderReductionCredit = new OrderReductionCredit(); | |||
$class = OrderReductionCreditContainer::getEntityFqcn(); | |||
$orderReductionCredit = new $class; | |||
$orderReductionCredit->setOrderShop($orderShop); | |||
$orderReductionCredit->setReductionCredit($reductionCredit); |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Order; | |||
use App\Entity\Order\OrderRefund; | |||
use Lc\CaracoleBundle\Container\Order\OrderRefundContainer; | |||
use Lc\CaracoleBundle\Model\Order\OrderRefundInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -10,7 +10,8 @@ class OrderRefundFactory extends AbstractFactory | |||
{ | |||
public function create(): OrderRefundInterface | |||
{ | |||
$orderRefund = new OrderRefund(); | |||
$class = OrderRefundContainer::getEntityFqcn(); | |||
$orderRefund = new $class; | |||
return $orderRefund; | |||
} |
@@ -2,17 +2,12 @@ | |||
namespace Lc\CaracoleBundle\Factory\Order; | |||
use App\Entity\Order\OrderShop; | |||
use Lc\CaracoleBundle\Event\Order\OrderShopChangeStatusEvent; | |||
use Lc\CaracoleBundle\Context\SectionContextTrait; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Container\Order\OrderShopContainer; | |||
use Lc\CaracoleBundle\Model\Order\OrderShopInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderStatusModel; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\CaracoleBundle\Model\User\VisitorInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
use Symfony\Component\EventDispatcher\EventDispatcherInterface; | |||
class OrderShopFactory extends AbstractFactory | |||
{ | |||
@@ -50,7 +45,8 @@ class OrderShopFactory extends AbstractFactory | |||
public function createBase(SectionInterface $section): OrderShopInterface | |||
{ | |||
$orderShop = new OrderShop(); | |||
$class = OrderShopContainer::getEntityFqcn(); | |||
$orderShop = new $class; | |||
$orderShop->setSection($section); | |||
return $orderShop; | |||
} |
@@ -2,7 +2,8 @@ | |||
namespace Lc\CaracoleBundle\Factory\Order; | |||
use App\Entity\Order\OrderStatus; | |||
use Lc\CaracoleBundle\Container\Order\OrderStatusContainer; | |||
use Lc\CaracoleBundle\Model\Order\OrderStatusInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -10,7 +11,8 @@ class OrderStatusFactory extends AbstractFactory | |||
{ | |||
public function create(): OrderStatusInterface | |||
{ | |||
$orderStatus = new OrderStatus(); | |||
$class = OrderStatusContainer::getEntityFqcn(); | |||
$orderStatus = new $class; | |||
return $orderStatus; | |||
} |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Order; | |||
use App\Entity\Order\OrderStatusHistory; | |||
use Lc\CaracoleBundle\Container\Order\OrderStatusHistoryContainer; | |||
use Lc\CaracoleBundle\Model\Order\OrderShopInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryModel; | |||
@@ -13,7 +13,8 @@ class OrderStatusHistoryFactory extends AbstractFactory | |||
{ | |||
public function create(OrderShopInterface $orderShop, OrderStatusInterface $status, string $origin = OrderStatusHistoryModel::ORIGIN_USER): OrderStatusHistoryInterface | |||
{ | |||
$orderStatusHistory = new OrderStatusHistory(); | |||
$class = OrderStatusHistoryContainer::getEntityFqcn(); | |||
$orderStatusHistory = new $class; | |||
$orderStatusHistory->setOrderShop($orderShop); | |||
$orderStatusHistory->setOrderStatus($status); |
@@ -2,8 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\PointSale; | |||
use App\Entity\PointSale\PointSale; | |||
use Lc\CaracoleBundle\Context\MerchantContextTrait; | |||
use Lc\CaracoleBundle\Container\PointSale\PointSaleContainer; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -13,7 +12,9 @@ class PointSaleFactory extends AbstractFactory | |||
public function create(MerchantInterface $merchant): PointSaleInterface | |||
{ | |||
$pointSale = new PointSale(); | |||
$class = PointSaleContainer::getEntityFqcn(); | |||
$pointSale = new $class; | |||
$pointSale->addMerchant($merchant); | |||
$pointSale->setStatus(1); |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\PointSale; | |||
use App\Entity\PointSale\PointSaleSection; | |||
use Lc\CaracoleBundle\Container\PointSale\PointSaleSectionContainer; | |||
use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface; | |||
use Lc\CaracoleBundle\Model\PointSale\PointSaleSectionInterface; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
@@ -13,7 +13,8 @@ class PointSaleSectionFactory extends AbstractFactory | |||
public function create(PointSaleInterface $pointSale, SectionInterface $section): PointSaleSectionInterface | |||
{ | |||
$pointSaleSection = new PointSaleSection(); | |||
$class = PointSaleSectionContainer::getEntityFqcn(); | |||
$pointSaleSection = new $class; | |||
$pointSaleSection->setPointSale($pointSale); | |||
$pointSaleSection->setSection($section); |
@@ -2,10 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Product; | |||
use App\Entity\Product\ProductCategory; | |||
use Lc\CaracoleBundle\Context\MerchantContextTrait; | |||
use Lc\CaracoleBundle\Context\SectionContextTrait; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Container\Product\ProductCategoryContainer; | |||
use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -14,7 +11,8 @@ class ProductCategoryFactory extends AbstractFactory | |||
{ | |||
public function create(SectionInterface $section): ProductCategoryInterface | |||
{ | |||
$productCategory = new ProductCategory(); | |||
$class = ProductCategoryContainer::getEntityFqcn(); | |||
$productCategory = new $class; | |||
$productCategory->setSection($section); | |||
$productCategory->setSaleStatus(true); |
@@ -2,7 +2,8 @@ | |||
namespace Lc\CaracoleBundle\Factory\Product; | |||
use App\Entity\Product\Product; | |||
use Lc\CaracoleBundle\Container\Product\ProductContainer; | |||
use Lc\CaracoleBundle\Model\Product\ProductInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -10,7 +11,8 @@ class ProductFactory extends AbstractFactory | |||
{ | |||
public function create(): ProductInterface | |||
{ | |||
$product = new Product(); | |||
$class = ProductContainer::getEntityFqcn(); | |||
$product = new $class; | |||
return $product; | |||
} |
@@ -2,19 +2,18 @@ | |||
namespace Lc\CaracoleBundle\Factory\Product; | |||
use App\Entity\Product\ProductFamily; | |||
use Lc\CaracoleBundle\Context\SectionContextTrait; | |||
use Lc\CaracoleBundle\Container\Product\ProductFamilyContainer; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface; | |||
use Lc\CaracoleBundle\Model\Product\ProductFamilyModel; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
class ProductFamilyFactory extends AbstractFactory | |||
{ | |||
public function create(MerchantInterface $merchant): ProductFamilyInterface | |||
{ | |||
$productFamily = new ProductFamily(); | |||
$class = ProductFamilyContainer::getEntityFqcn(); | |||
$productFamily = new $class; | |||
$productFamily->setBehaviorAddToCart(ProductFamilyModel::BEHAVIOR_ADD_TO_CART_SIMPLE); | |||
$productFamily->setSaleStatus(true); |
@@ -2,12 +2,8 @@ | |||
namespace Lc\CaracoleBundle\Factory\Product; | |||
use App\Entity\Product\ProductCategory; | |||
use App\Entity\Product\ProductFamilySectionProperty; | |||
use Lc\CaracoleBundle\Context\MerchantContextTrait; | |||
use Lc\CaracoleBundle\Context\SectionContextTrait; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface; | |||
use Lc\CaracoleBundle\Container\Product\ProductFamilySectionPropertyContainer; | |||
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -17,7 +13,9 @@ class ProductFamilySectionPropertyFactory extends AbstractFactory | |||
public function create(SectionInterface $section, ProductFamilyInterface $productFamily): ProductFamilySectionProperty | |||
{ | |||
$productFamilySectionProperty = new ProductFamilySectionProperty(); | |||
$class = ProductFamilySectionPropertyContainer::getEntityFqcn(); | |||
$productFamilySectionProperty = new $class; | |||
$productFamilySectionProperty->setSection($section); | |||
$productFamilySectionProperty->setProductFamily($productFamily); |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Product; | |||
use App\Entity\Product\QualityLabel; | |||
use Lc\CaracoleBundle\Container\Product\QualityLabelContainer; | |||
use Lc\CaracoleBundle\Model\Product\QualityLabelInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -10,7 +11,8 @@ class QualityLabelFactory extends AbstractFactory | |||
{ | |||
public function create(): QualityLabelInterface | |||
{ | |||
$qualityLabel = new QualityLabel(); | |||
$class = QualityLabelContainer::getEntityFqcn(); | |||
$qualityLabel = new $class; | |||
$qualityLabel->setStatus(1); | |||
return $qualityLabel; |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||
use App\Entity\Reduction\ReductionCart; | |||
use Lc\CaracoleBundle\Container\Reduction\ReductionCartContainer; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -12,7 +13,8 @@ class ReductionCartFactory extends AbstractFactory | |||
public function create(MerchantInterface $merchant): ReductionCartInterface | |||
{ | |||
$reductionCart = new ReductionCart(); | |||
$class = ReductionCartContainer::getEntityFqcn(); | |||
$reductionCart = new $class; | |||
$reductionCart->setMerchant($merchant); | |||
$reductionCart->setStatus(1); |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||
use App\Entity\Reduction\ReductionCatalog; | |||
use Lc\CaracoleBundle\Container\Reduction\ReductionCatalogContainer; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCatalogInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -12,7 +13,8 @@ class ReductionCatalogFactory extends AbstractFactory | |||
public function create(MerchantInterface $merchant, int $status = 1): ReductionCatalogInterface | |||
{ | |||
$reductionCatalog = new ReductionCatalog(); | |||
$class = ReductionCatalogContainer::getEntityFqcn(); | |||
$reductionCatalog = new $class; | |||
$reductionCatalog->setMerchant($merchant); | |||
$reductionCatalog->setStatus($status); |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||
use App\Entity\Reduction\ReductionCredit; | |||
use Lc\CaracoleBundle\Container\Reduction\ReductionCreditContainer; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCreditModel; | |||
@@ -13,7 +14,8 @@ class ReductionCreditFactory extends AbstractFactory | |||
public function create(MerchantInterface $merchant, string $type = ReductionCreditModel::TYPE_CREDIT): ReductionCreditInterface | |||
{ | |||
$reductionCredit = new ReductionCredit(); | |||
$class = ReductionCreditContainer::getEntityFqcn(); | |||
$reductionCredit = new $class; | |||
$reductionCredit->setMerchant($merchant); | |||
$reductionCredit->setType($type); |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Section; | |||
use App\Entity\Section\Opening; | |||
use Lc\CaracoleBundle\Container\Section\OpeningContainer; | |||
use Lc\CaracoleBundle\Context\SectionContextTrait; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -18,7 +19,9 @@ class OpeningFactory extends AbstractFactory | |||
\DateTime $timeEnd = null, | |||
GroupUserInterface $groupUser = null | |||
): Opening { | |||
$opening = new Opening(); | |||
$class = OpeningContainer::getEntityFqcn(); | |||
$opening = new $class; | |||
$opening->setSection($section); | |||
@@ -2,8 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Section; | |||
use App\Entity\Section\Section; | |||
use Lc\CaracoleBundle\Context\MerchantContextTrait; | |||
use Lc\CaracoleBundle\Container\Section\SectionContainer; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -13,7 +12,8 @@ class SectionFactory extends AbstractFactory | |||
public function create(MerchantInterface $merchant): SectionInterface | |||
{ | |||
$section = new Section(); | |||
$class = SectionContainer::getEntityFqcn(); | |||
$section = new $class; | |||
$section->setMerchant($merchant); | |||
$section->setStatus(1); |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Setting; | |||
use App\Entity\Setting\MerchantSetting; | |||
use Lc\CaracoleBundle\Container\Setting\MerchantSettingContainer; | |||
use Lc\CaracoleBundle\Context\MerchantContextTrait; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -13,7 +14,8 @@ class MerchantSettingFactory extends AbstractFactory | |||
public function create(MerchantInterface $merchant, string $name, string $text = null, \DateTime $date = null, FileInterface $file = null) | |||
{ | |||
$merchantSetting = new MerchantSetting(); | |||
$class = MerchantSettingContainer::getEntityFqcn(); | |||
$merchantSetting = new $class; | |||
$merchantSetting->setMerchant($merchant); | |||
$merchantSetting->setName($name); |
@@ -2,8 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\Setting; | |||
use App\Entity\Setting\SectionSetting; | |||
use Lc\CaracoleBundle\Context\SectionContextTrait; | |||
use Lc\CaracoleBundle\Container\Setting\SectionSettingContainer; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
use Lc\SovBundle\Model\File\FileInterface; | |||
@@ -18,7 +17,8 @@ class SectionSettingFactory extends AbstractFactory | |||
\DateTime $date = null, | |||
FileInterface $file = null | |||
) { | |||
$merchantSetting = new SectionSetting(); | |||
$class = SectionSettingContainer::getEntityFqcn(); | |||
$merchantSetting = new $class; | |||
$merchantSetting->setSection($section); | |||
$merchantSetting->setName($name); |
@@ -2,8 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\User; | |||
use App\Entity\User\UserMerchant; | |||
use Lc\CaracoleBundle\Context\MerchantContextTrait; | |||
use Lc\CaracoleBundle\Container\User\UserMerchantContainer; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\User\UserMerchantInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -13,7 +12,8 @@ class UserMerchantFactory extends AbstractFactory | |||
{ | |||
public function createBase(MerchantInterface $merchant): UserMerchantInterface | |||
{ | |||
$userMerchant = new UserMerchant(); | |||
$class = UserMerchantContainer::getEntityFqcn(); | |||
$userMerchant = new $class; | |||
$userMerchant->setMerchant($merchant); | |||
return $userMerchant; |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\User; | |||
use App\Entity\User\UserPointSale; | |||
use Lc\CaracoleBundle\Container\User\UserPointSaleContainer; | |||
use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface; | |||
use Lc\CaracoleBundle\Model\User\UserPointSaleInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -12,7 +13,8 @@ class UserPointSaleFactory extends AbstractFactory | |||
{ | |||
public function create(UserInterface $user, PointSaleInterface $pointSale): UserPointSaleInterface | |||
{ | |||
$userPointSale = new UserPointSale(); | |||
$class = UserPointSaleContainer::getEntityFqcn(); | |||
$userPointSale = new $class; | |||
$userPointSale->setUser($user); | |||
$userPointSale->setPointSale($pointSale); |
@@ -3,6 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Factory\User; | |||
use App\Entity\User\Visitor; | |||
use Lc\CaracoleBundle\Container\User\VisitorContainer; | |||
use Lc\CaracoleBundle\Model\User\VisitorInterface; | |||
use Lc\SovBundle\Factory\AbstractFactory; | |||
@@ -10,7 +11,8 @@ class VisitorFactory extends AbstractFactory | |||
{ | |||
public static function create(string $cookie, string $ip): VisitorInterface | |||
{ | |||
$visitor = new Visitor(); | |||
$class = VisitorContainer::getEntityFqcn(); | |||
$visitor = new $class; | |||
$visitor->setCookie($cookie); | |||
$visitor->setIp($ip); |