use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\Config\TaxRateFactory; | |||||
use Lc\SovBundle\Controller\AbstractAdminController; | use Lc\SovBundle\Controller\AbstractAdminController; | ||||
abstract class TaxRateAdminController extends AbstractAdminController | abstract class TaxRateAdminController extends AbstractAdminController | ||||
NumberField::new('value') | NumberField::new('value') | ||||
]; | ]; | ||||
} | } | ||||
public function createEntity(string $entityFqcn) | |||||
{ | |||||
$factory = new TaxRateFactory(); | |||||
return $factory->create(); | |||||
} | |||||
} | } |
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\Config\UnitFactory; | |||||
use Lc\SovBundle\Controller\AbstractAdminController; | use Lc\SovBundle\Controller\AbstractAdminController; | ||||
abstract class UnitAdminController extends AbstractAdminController | abstract class UnitAdminController extends AbstractAdminController | ||||
AssociationField::new('unitReference'), | AssociationField::new('unitReference'), | ||||
]; | ]; | ||||
} | } | ||||
public function createEntity(string $entityFqcn) | |||||
{ | |||||
$factory = new UnitFactory(); | |||||
return $factory->create(); | |||||
} | |||||
} | } |
use EasyCorp\Bundle\EasyAdminBundle\Provider\AdminContextProvider; | use EasyCorp\Bundle\EasyAdminBundle\Provider\AdminContextProvider; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator; | use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\Credit\CreditHistoryFactory; | |||||
use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface; | use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface; | ||||
use Lc\CaracoleBundle\Model\Credit\CreditHistoryModel; | use Lc\CaracoleBundle\Model\Credit\CreditHistoryModel; | ||||
use Lc\CaracoleBundle\Model\User\UserMerchantInterface; | use Lc\CaracoleBundle\Model\User\UserMerchantInterface; | ||||
} | } | ||||
} | } | ||||
public function createEntity(string $entityFqcn) | |||||
{ | |||||
$factory = new CreditHistoryFactory(); | |||||
return $factory->create(); | |||||
} | |||||
public function persistEntity(EntityManagerInterface $entityManager, $entityInstance): void | public function persistEntity(EntityManagerInterface $entityManager, $entityInstance): void | ||||
{ | { | ||||
$entityInstance->setUserMerchant($this->getUserMerchant()); | $entityInstance->setUserMerchant($this->getUserMerchant()); |
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\Merchant\MerchantFactory; | |||||
use Lc\CaracoleBundle\Field\Address\AddressField; | use Lc\CaracoleBundle\Field\Address\AddressField; | ||||
use Lc\SovBundle\Controller\AbstractAdminController; | use Lc\SovBundle\Controller\AbstractAdminController; | ||||
use Lc\SovBundle\Field\CKEditorField; | use Lc\SovBundle\Field\CKEditorField; | ||||
); | ); | ||||
} | } | ||||
public function createEntity(string $entityFqcn) | |||||
{ | |||||
$factory = new MerchantFactory(); | |||||
return $factory->create(); | |||||
} | |||||
} | } |
namespace Lc\CaracoleBundle\Controller\Newsletter; | namespace Lc\CaracoleBundle\Controller\Newsletter; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\Newsletter\NewsletterFactory; | |||||
use Lc\SovBundle\Controller\Newsletter\NewsletterAdminController as SovNewsletterAdminController; | use Lc\SovBundle\Controller\Newsletter\NewsletterAdminController as SovNewsletterAdminController; | ||||
abstract class NewsletterAdminController extends SovNewsletterAdminController | abstract class NewsletterAdminController extends SovNewsletterAdminController | ||||
{ | { | ||||
use AdminControllerTrait; | use AdminControllerTrait; | ||||
public function createEntity(string $entityFqcn) | |||||
{ | |||||
$factory = new NewsletterFactory(); | |||||
$factory->setMerchant($this->get('merchant_resolver')->getCurrent()); | |||||
return $factory->create(); | |||||
} | |||||
} | } |
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\PointSale\PointSaleFactory; | |||||
use Lc\CaracoleBundle\Field\Address\AddressField; | use Lc\CaracoleBundle\Field\Address\AddressField; | ||||
use Lc\SovBundle\Controller\AbstractAdminController; | use Lc\SovBundle\Controller\AbstractAdminController; | ||||
use Lc\SovBundle\Field\StatusField; | use Lc\SovBundle\Field\StatusField; | ||||
); | ); | ||||
} | } | ||||
public function createEntity(string $entityFqcn) | |||||
{ | |||||
$factory = new PointSaleFactory(); | |||||
$currentMerchant = $this->get('merchant_resolver')->getCurrent(); | |||||
return $factory->create($currentMerchant); | |||||
} | |||||
} | } |
namespace Lc\CaracoleBundle\Controller\Reminder; | namespace Lc\CaracoleBundle\Controller\Reminder; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\Reminder\ReminderFactory; | |||||
use Lc\SovBundle\Controller\Reminder\ReminderAdminController as SovReminderAdminController; | use Lc\SovBundle\Controller\Reminder\ReminderAdminController as SovReminderAdminController; | ||||
class ReminderAdminController extends SovReminderAdminController | class ReminderAdminController extends SovReminderAdminController | ||||
public function createEntity(string $crudAction = null, string $crudControllerFqcn = null, int $entityId = null) | public function createEntity(string $crudAction = null, string $crudControllerFqcn = null, int $entityId = null) | ||||
{ | { | ||||
return $this->reminderFactory | |||||
$factory = new ReminderFactory(); | |||||
return $factory | |||||
->setMerchant($this->get('merchant_resolver')->getCurrent()) | ->setMerchant($this->get('merchant_resolver')->getCurrent()) | ||||
->setSection($this->get('section_resolver')->getCurrent()) | ->setSection($this->get('section_resolver')->getCurrent()) | ||||
->create($crudAction, $crudControllerFqcn, $entityId); | ->create($crudAction, $crudControllerFqcn, $entityId); |
use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField; | use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TimeField; | use EasyCorp\Bundle\EasyAdminBundle\Field\TimeField; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\Section\OpeningFactory; | |||||
use Lc\SovBundle\Controller\AbstractAdminController; | use Lc\SovBundle\Controller\AbstractAdminController; | ||||
abstract class OpeningAdminController extends AbstractAdminController | abstract class OpeningAdminController extends AbstractAdminController | ||||
return $crud; | return $crud; | ||||
} | } | ||||
public function createEntity(string $entityFqcn) | |||||
{ | |||||
$factory = new OpeningFactory(); | |||||
$currentSection = $this->get('section_resolver')->getCurrent(); | |||||
return $factory->create($currentSection); | |||||
} | |||||
} | } |
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\Section\SectionFactory; | |||||
use Lc\CaracoleBundle\Form\Section\OpeningsFormType; | use Lc\CaracoleBundle\Form\Section\OpeningsFormType; | ||||
use Lc\CaracoleBundle\Model\Section\SectionModel; | use Lc\CaracoleBundle\Model\Section\SectionModel; | ||||
use Lc\SovBundle\Controller\AbstractAdminController; | use Lc\SovBundle\Controller\AbstractAdminController; | ||||
); | ); | ||||
} | } | ||||
public function createEntity(string $entityFqcn) | |||||
{ | |||||
$factory = new SectionFactory(); | |||||
$currentMerchant = $this->get('merchant_resolver')->getCurrent(); | |||||
return $factory->create($currentMerchant); | |||||
} | |||||
} | } |
namespace Lc\CaracoleBundle\Controller\Site; | namespace Lc\CaracoleBundle\Controller\Site; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\Site\NewsFactory; | |||||
use Lc\SovBundle\Controller\Site\NewsAdminController as SovNewsAdminController; | use Lc\SovBundle\Controller\Site\NewsAdminController as SovNewsAdminController; | ||||
abstract class NewsAdminController extends SovNewsAdminController | abstract class NewsAdminController extends SovNewsAdminController | ||||
{ | { | ||||
use AdminControllerTrait; | use AdminControllerTrait; | ||||
public function createEntity(string $entityFqcn) | |||||
{ | |||||
$factory = new NewsFactory(); | |||||
$currentMerchant = $this->get('merchant_resolver')->getCurrent(); | |||||
$factory->setMerchant($currentMerchant); | |||||
return $factory->create(); | |||||
} | |||||
} | } |
namespace Lc\CaracoleBundle\Controller\Site; | namespace Lc\CaracoleBundle\Controller\Site; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\Site\PageFactory; | |||||
use Lc\SovBundle\Controller\Site\PageAdminController as SovPageAdminController; | use Lc\SovBundle\Controller\Site\PageAdminController as SovPageAdminController; | ||||
abstract class PageAdminController extends SovPageAdminController | abstract class PageAdminController extends SovPageAdminController | ||||
{ | { | ||||
use AdminControllerTrait; | use AdminControllerTrait; | ||||
public function createEntity(string $entityFqcn) | |||||
{ | |||||
$factory = new PageFactory(); | |||||
$currentMerchant = $this->get('merchant_resolver')->getCurrent(); | |||||
$currentSection = $this->get('section_resolver')->getCurrent(); | |||||
$factory->setMerchant($currentMerchant); | |||||
$factory->setSection($currentSection); | |||||
return $factory->create(); | |||||
} | |||||
} | } |
namespace Lc\CaracoleBundle\Controller\User; | namespace Lc\CaracoleBundle\Controller\User; | ||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\CaracoleBundle\Factory\User\GroupUserFactory; | |||||
use Lc\SovBundle\Controller\User\GroupUserAdminController as SovGroupUserAdminController; | use Lc\SovBundle\Controller\User\GroupUserAdminController as SovGroupUserAdminController; | ||||
abstract class GroupUserAdminController extends SovGroupUserAdminController | abstract class GroupUserAdminController extends SovGroupUserAdminController | ||||
{ | { | ||||
use AdminControllerTrait; | use AdminControllerTrait; | ||||
public function createEntity(string $entityFqcn) | |||||
{ | |||||
$factory = new GroupUserFactory(); | |||||
$currentMerchant = $this->get('merchant_resolver')->getCurrent(); | |||||
$factory->setMerchant($currentMerchant); | |||||
return $factory->create(); | |||||
} | |||||
} | } |
namespace Lc\CaracoleBundle\Factory\Address; | namespace Lc\CaracoleBundle\Factory\Address; | ||||
use App\Entity\Address\Address; | use App\Entity\Address\Address; | ||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||||
use Lc\CaracoleBundle\Model\Address\AddressInterface; | use Lc\CaracoleBundle\Model\Address\AddressInterface; | ||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class AddressFactory extends AbstractFactory implements AddressFactoryInterface | |||||
class AddressFactory extends AbstractFactory | |||||
{ | { | ||||
use MerchantFactoryTrait; | |||||
public function create(): AddressInterface | |||||
public function create(MerchantInterface $merchant = null): AddressInterface | |||||
{ | { | ||||
$address = new Address(); | $address = new Address(); | ||||
$address->setMerchant($this->merchant); | |||||
$address->setMerchant($merchant); | |||||
return $address; | return $address; | ||||
} | } |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Address; | |||||
interface AddressFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\Config\TaxRateInterface; | use Lc\CaracoleBundle\Model\Config\TaxRateInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class TaxRateFactory extends AbstractFactory implements TaxRateFactoryInterface | |||||
class TaxRateFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): TaxRateInterface | public function create(): TaxRateInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Config; | |||||
interface TaxRateFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\Config\UnitInterface; | use Lc\CaracoleBundle\Model\Config\UnitInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class UnitFactory extends AbstractFactory implements UnitFactoryInterface | |||||
class UnitFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): UnitInterface | public function create(): UnitInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Config; | |||||
interface UnitFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\Credit; | namespace Lc\CaracoleBundle\Factory\Credit; | ||||
use App\Entity\Credit\CreditHistory; | use App\Entity\Credit\CreditHistory; | ||||
use Lc\CaracoleBundle\Factory\CreditHistory\CreditHistoryFactoryInterface; | |||||
use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface; | use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class CreditHistoryFactory extends AbstractFactory implements CreditHistoryFactoryInterface | |||||
class CreditHistoryFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): CreditHistoryInterface | public function create(): CreditHistoryInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Credit; | |||||
interface CreditHistoryFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\File\DocumentInterface; | use Lc\CaracoleBundle\Model\File\DocumentInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class DocumentFactory extends AbstractFactory implements DocumentFactoryInterface | |||||
class DocumentFactory extends AbstractFactory | |||||
{ | { | ||||
use MerchantFactoryTrait; | use MerchantFactoryTrait; | ||||
<?php | |||||
namespace Lc\CaracoleBundle\Factory\File; | |||||
interface DocumentFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class MerchantFactory extends AbstractFactory implements MerchantFactoryInterface | |||||
class MerchantFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): MerchantInterface | public function create(): MerchantInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Merchant; | |||||
interface MerchantFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\Newsletter; | namespace Lc\CaracoleBundle\Factory\Newsletter; | ||||
use App\Entity\Newsletter\Newsletter; | |||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | ||||
use Lc\SovBundle\Model\Newsletter\NewsletterInterface; | use Lc\SovBundle\Model\Newsletter\NewsletterInterface; | ||||
use Lc\SovBundle\Factory\Newsletter\NewsletterFactory as SovNewsletterFactory; | use Lc\SovBundle\Factory\Newsletter\NewsletterFactory as SovNewsletterFactory; |
use Lc\CaracoleBundle\Model\Order\OrderPaymentInterface; | use Lc\CaracoleBundle\Model\Order\OrderPaymentInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class OrderPaymentFactory extends AbstractFactory implements OrderPaymentFactoryInterface | |||||
class OrderPaymentFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): OrderPaymentInterface | public function create(): OrderPaymentInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderPaymentFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\Order\OrderProductInterface; | use Lc\CaracoleBundle\Model\Order\OrderProductInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class OrderProductFactory extends AbstractFactory implements OrderProductFactoryInterface | |||||
class OrderProductFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): OrderProductInterface | public function create(): OrderProductInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderProductFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\Order\OrderProductReductionCatalogInterface; | use Lc\CaracoleBundle\Model\Order\OrderProductReductionCatalogInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class OrderProductReductionCatalogFactory extends AbstractFactory implements OrderProductReductionCatalogFactoryInterface | |||||
class OrderProductReductionCatalogFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): OrderProductReductionCatalogInterface | public function create(): OrderProductReductionCatalogInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderProductReductionCatalogFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\Order\OrderProductRefundInterface; | use Lc\CaracoleBundle\Model\Order\OrderProductRefundInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class OrderProductRefundFactory extends AbstractFactory implements OrderProductRefundFactoryInterface | |||||
class OrderProductRefundFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): OrderProductRefundInterface | public function create(): OrderProductRefundInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderProductRefundFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\Order\OrderReductionCartInterface; | use Lc\CaracoleBundle\Model\Order\OrderReductionCartInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class OrderReductionCartFactory extends AbstractFactory implements OrderReductionCartFactoryInterface | |||||
class OrderReductionCartFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): OrderReductionCartInterface | public function create(): OrderReductionCartInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderReductionCartFactoryInterface{ | |||||
} |
use Lc\CaracoleBundle\Model\Order\OrderReductionCreditInterface; | use Lc\CaracoleBundle\Model\Order\OrderReductionCreditInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class OrderReductionCreditFactory extends AbstractFactory implements OrderReductionCreditFactoryInterface | |||||
class OrderReductionCreditFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): OrderReductionCreditInterface | public function create(): OrderReductionCreditInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderReductionCreditFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\Order\OrderRefundInterface; | use Lc\CaracoleBundle\Model\Order\OrderRefundInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class OrderRefundFactory extends AbstractFactory implements OrderRefundFactoryInterface | |||||
class OrderRefundFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): OrderRefundInterface | public function create(): OrderRefundInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderRefundFactoryInterface | |||||
{ | |||||
} |
use App\Entity\Order\OrderShop; | use App\Entity\Order\OrderShop; | ||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | ||||
use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | ||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||||
use Lc\CaracoleBundle\Model\Order\OrderShopInterface; | use Lc\CaracoleBundle\Model\Order\OrderShopInterface; | ||||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class OrderShopFactory extends AbstractFactory implements OrderShopFactoryInterface | |||||
class OrderShopFactory extends AbstractFactory | |||||
{ | { | ||||
use MerchantFactoryTrait; | |||||
use SectionFactoryTrait; | |||||
public function create(): OrderShopInterface | |||||
public function create(MerchantInterface $merchant, SectionInterface $section): OrderShopInterface | |||||
{ | { | ||||
$orderShop = new OrderShop(); | $orderShop = new OrderShop(); | ||||
$orderShop->setMerchant($this->merchant); | |||||
$orderShop->setSection($this->section); | |||||
$orderShop->setMerchant($merchant); | |||||
$orderShop->setSection($section); | |||||
return $orderShop; | return $orderShop; | ||||
} | } |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderShopFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\Order\OrderStatusInterface; | use Lc\CaracoleBundle\Model\Order\OrderStatusInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class OrderStatusFactory extends AbstractFactory implements OrderStatusFactoryInterface | |||||
class OrderStatusFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): OrderStatusInterface | public function create(): OrderStatusInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderStatusFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryInterface; | use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class OrderStatusHistoryFactory extends AbstractFactory implements OrderStatusHistoryFactoryInterface | |||||
class OrderStatusHistoryFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): OrderStatusHistoryInterface | public function create(): OrderStatusHistoryInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderStatusHistoryFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\PointSale; | namespace Lc\CaracoleBundle\Factory\PointSale; | ||||
use App\Entity\PointSale\PointSale; | use App\Entity\PointSale\PointSale; | ||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||||
use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface; | use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class PointSaleFactory extends AbstractFactory implements PointSaleFactoryInterface | |||||
class PointSaleFactory extends AbstractFactory | |||||
{ | { | ||||
use MerchantFactoryTrait; | |||||
public function create(): PointSaleInterface | |||||
public function create(MerchantInterface $merchant): PointSaleInterface | |||||
{ | { | ||||
$pointSale = new PointSale(); | $pointSale = new PointSale(); | ||||
$pointSale->addMerchant($this->merchant); | |||||
$pointSale->addMerchant($merchant); | |||||
return $pointSale; | return $pointSale; | ||||
} | } |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\PointSale; | |||||
interface PointSaleFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\Product; | namespace Lc\CaracoleBundle\Factory\Product; | ||||
use App\Entity\Product\ProductCategory; | use App\Entity\Product\ProductCategory; | ||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||||
use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | |||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||||
use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface; | use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface; | ||||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class ProductCategoryFactory extends AbstractFactory implements ProductCategoryFactoryInterface | |||||
class ProductCategoryFactory extends AbstractFactory | |||||
{ | { | ||||
use MerchantFactoryTrait; | |||||
use SectionFactoryTrait; | |||||
public function create(): ProductCategoryInterface | |||||
public function create(MerchantInterface $merchant, SectionInterface $section): ProductCategoryInterface | |||||
{ | { | ||||
$productCategory = new ProductCategory(); | $productCategory = new ProductCategory(); | ||||
$productCategory->setMerchant($this->merchant); | |||||
$productCategory->setSection($this->section); | |||||
$productCategory->setMerchant($merchant); | |||||
$productCategory->setSection($section); | |||||
return $productCategory; | return $productCategory; | ||||
} | } |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Product; | |||||
interface ProductCategoryFactoryInterface | |||||
{ | |||||
} |
use Lc\CaracoleBundle\Model\Product\ProductInterface; | use Lc\CaracoleBundle\Model\Product\ProductInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class ProductFactory extends AbstractFactory implements ProductFactoryInterface | |||||
class ProductFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): ProductInterface | public function create(): ProductInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Product; | |||||
interface ProductFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\Product; | namespace Lc\CaracoleBundle\Factory\Product; | ||||
use App\Entity\Product\ProductFamily; | use App\Entity\Product\ProductFamily; | ||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||||
use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | |||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||||
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface; | use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface; | ||||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class ProductFamilyFactory extends AbstractFactory implements ProductFamilyFactoryInterface | |||||
class ProductFamilyFactory extends AbstractFactory | |||||
{ | { | ||||
use MerchantFactoryTrait; | |||||
use SectionFactoryTrait; | |||||
public function create(): ProductFamilyInterface | |||||
public function create(MerchantInterface $merchant, SectionInterface $section): ProductFamilyInterface | |||||
{ | { | ||||
$productFamily = new ProductFamily(); | $productFamily = new ProductFamily(); | ||||
$productFamily->setMerchant($this->merchant); | |||||
$productFamily->setSection($this->section); | |||||
$productFamily->setMerchant($merchant); | |||||
$productFamily->setSection($section); | |||||
return $productFamily; | return $productFamily; | ||||
} | } |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Product; | |||||
interface ProductFamilyFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\Reduction; | namespace Lc\CaracoleBundle\Factory\Reduction; | ||||
use App\Entity\Reduction\ReductionCart; | use App\Entity\Reduction\ReductionCart; | ||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||||
use Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface; | use Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class ReductionCartFactory extends AbstractFactory implements ReductionCartFactoryInterface | |||||
class ReductionCartFactory extends AbstractFactory | |||||
{ | { | ||||
use MerchantFactoryTrait; | |||||
public function create(): ReductionCartInterface | |||||
public function create(MerchantInterface $merchant): ReductionCartInterface | |||||
{ | { | ||||
$reductionCart = new ReductionCart(); | $reductionCart = new ReductionCart(); | ||||
$reductionCart->setMerchant($this->merchant); | |||||
$reductionCart->setMerchant($merchant); | |||||
return $reductionCart; | return $reductionCart; | ||||
} | } |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||||
interface ReductionCartFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\Reduction; | namespace Lc\CaracoleBundle\Factory\Reduction; | ||||
use App\Entity\Reduction\ReductionCatalog; | use App\Entity\Reduction\ReductionCatalog; | ||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||||
use Lc\CaracoleBundle\Model\Reduction\ReductionCatalogInterface; | use Lc\CaracoleBundle\Model\Reduction\ReductionCatalogInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class ReductionCatalogFactory extends AbstractFactory implements ReductionCatalogFactoryInterface | |||||
class ReductionCatalogFactory extends AbstractFactory | |||||
{ | { | ||||
use MerchantFactoryTrait; | |||||
public function create(): ReductionCatalogInterface | |||||
public function create(MerchantInterface $merchant): ReductionCatalogInterface | |||||
{ | { | ||||
$reductionCatalog = new ReductionCatalog(); | $reductionCatalog = new ReductionCatalog(); | ||||
$reductionCatalog->setMerchant($this->merchant); | |||||
$reductionCatalog->setMerchant($merchant); | |||||
return $reductionCatalog; | return $reductionCatalog; | ||||
} | } |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||||
interface ReductionCatalogFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\Reduction; | namespace Lc\CaracoleBundle\Factory\Reduction; | ||||
use App\Entity\Reduction\ReductionCredit; | use App\Entity\Reduction\ReductionCredit; | ||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||||
use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface; | use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class ReductionCreditFactory extends AbstractFactory implements ReductionCreditFactoryInterface | |||||
class ReductionCreditFactory extends AbstractFactory | |||||
{ | { | ||||
use MerchantFactoryTrait; | |||||
public function create(): ReductionCreditInterface | |||||
public function create(MerchantInterface $merchant): ReductionCreditInterface | |||||
{ | { | ||||
$reductionCredit = new ReductionCredit(); | $reductionCredit = new ReductionCredit(); | ||||
$reductionCredit->setMerchant($this->merchant); | |||||
$reductionCredit->setMerchant($merchant); | |||||
return $reductionCredit; | return $reductionCredit; | ||||
} | } |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||||
interface ReductionCreditFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\Section; | namespace Lc\CaracoleBundle\Factory\Section; | ||||
use App\Entity\Section\Opening; | use App\Entity\Section\Opening; | ||||
use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | |||||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
use Lc\SovBundle\Model\User\GroupUserInterface; | use Lc\SovBundle\Model\User\GroupUserInterface; | ||||
class OpeningFactory extends AbstractFactory implements OpeningFactoryInterface | |||||
class OpeningFactory extends AbstractFactory | |||||
{ | { | ||||
use SectionFactoryTrait; | |||||
public function create( | public function create( | ||||
SectionInterface $section, | |||||
int $day, | int $day, | ||||
\DateTime $timeStart = null, | \DateTime $timeStart = null, | ||||
\DateTime $timeEnd = null, | \DateTime $timeEnd = null, | ||||
): Opening { | ): Opening { | ||||
$opening = new Opening(); | $opening = new Opening(); | ||||
$opening->setSection($this->section); | |||||
$opening->setSection($section); | |||||
$opening->setDay($day); | $opening->setDay($day); | ||||
$opening->setTimeStart($timeStart); | $opening->setTimeStart($timeStart); | ||||
$opening->setTimeEnd($timeEnd); | $opening->setTimeEnd($timeEnd); |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Section; | |||||
interface OpeningFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\Section; | namespace Lc\CaracoleBundle\Factory\Section; | ||||
use App\Entity\Section\Section; | use App\Entity\Section\Section; | ||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||||
use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | |||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | use Lc\CaracoleBundle\Model\Section\SectionInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class SectionFactory extends AbstractFactory implements SectionFactoryInterface | |||||
class SectionFactory extends AbstractFactory | |||||
{ | { | ||||
use MerchantFactoryTrait; | |||||
public function create(): SectionInterface | |||||
public function create(MerchantInterface $merchant): SectionInterface | |||||
{ | { | ||||
$section = new Section(); | $section = new Section(); | ||||
$section->setMerchant($this->merchant); | |||||
$section->setMerchant($merchant); | |||||
return $section; | return $section; | ||||
} | } |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Section; | |||||
interface SectionFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\User; | namespace Lc\CaracoleBundle\Factory\User; | ||||
use App\Entity\User\GroupUser; | |||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | |||||
use Lc\SovBundle\Model\User\GroupUserInterface; | use Lc\SovBundle\Model\User\GroupUserInterface; | ||||
use Lc\SovBundle\Factory\User\GroupUserFactory as SovGroupUserFactory; | |||||
class GroupUserFactory extends AbstractFactory implements GroupUserFactoryInterface | |||||
class GroupUserFactory extends SovGroupUserFactory | |||||
{ | { | ||||
use MerchantFactoryTrait; | use MerchantFactoryTrait; | ||||
public function create(): GroupUserInterface | public function create(): GroupUserInterface | ||||
{ | { | ||||
$groupUser = new GroupUser(); | |||||
$groupUser = parent::create(); | |||||
$groupUser->setMerchant($this->merchant); | $groupUser->setMerchant($this->merchant); | ||||
<?php | |||||
namespace Lc\CaracoleBundle\Factory\User; | |||||
interface GroupUserFactoryInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\Factory\User; | namespace Lc\CaracoleBundle\Factory\User; | ||||
use App\Entity\User\UserMerchant; | use App\Entity\User\UserMerchant; | ||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | |||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||||
use Lc\CaracoleBundle\Model\User\UserMerchantInterface; | use Lc\CaracoleBundle\Model\User\UserMerchantInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class UserMerchantFactory extends AbstractFactory | class UserMerchantFactory extends AbstractFactory | ||||
{ | { | ||||
use MerchantFactoryTrait; | |||||
public function create(): UserMerchantInterface | |||||
public function create(MerchantInterface $merchant): UserMerchantInterface | |||||
{ | { | ||||
$userMerchant = new UserMerchant(); | $userMerchant = new UserMerchant(); | ||||
$userMerchant->setMerchant($this->merchant); | |||||
$userMerchant->setMerchant($merchant); | |||||
return $userMerchant; | return $userMerchant; | ||||
} | } |
use Lc\CaracoleBundle\Model\User\VisitorInterface; | use Lc\CaracoleBundle\Model\User\VisitorInterface; | ||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class VisitorFactory extends AbstractFactory implements VisitorFactoryInterface | |||||
class VisitorFactory extends AbstractFactory | |||||
{ | { | ||||
public function create(): VisitorInterface | public function create(): VisitorInterface | ||||
{ | { |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\User; | |||||
interface VisitorFactoryInterface | |||||
{ | |||||
} |