Explorar el Código

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Fab hace 3 años
padre
commit
8f7820e286
Se han modificado 100 ficheros con 1118 adiciones y 425 borrados
  1. +14
    -0
      Controller/AdminControllerTrait.php
  2. +1
    -1
      Controller/Credit/CreditHistoryAdminController.php
  3. +4
    -0
      Controller/Merchant/FavoriteMerchantController.php
  4. +4
    -1
      Controller/Merchant/SwitchMerchantController.php
  5. +4
    -0
      Controller/Section/SwitchSectionAdminController.php
  6. +19
    -9
      Controller/Setting/SettingAdminController.php
  7. +1
    -0
      Controller/Ticket/TicketAdminController.php
  8. +1
    -1
      Controller/User/UserMerchantAdminController.php
  9. +1
    -4
      EventSubscriber/SettingEventSubscriber.php
  10. +1
    -1
      EventSubscriber/User/UserRolesEventSubscriber.php
  11. +23
    -0
      Factory/Address/AddressFactory.php
  12. +8
    -0
      Factory/Address/AddressFactoryInterface.php
  13. +18
    -0
      Factory/Config/TaxRateFactory.php
  14. +8
    -0
      Factory/Config/TaxRateFactoryInterface.php
  15. +18
    -0
      Factory/Config/UnitFactory.php
  16. +8
    -0
      Factory/Config/UnitFactoryInterface.php
  17. +19
    -0
      Factory/Credit/CreditHistoryFactory.php
  18. +8
    -0
      Factory/Credit/CreditHistoryFactoryInterface.php
  19. +23
    -0
      Factory/File/DocumentFactory.php
  20. +8
    -0
      Factory/File/DocumentFactoryInterface.php
  21. +18
    -0
      Factory/Merchant/MerchantFactory.php
  22. +8
    -0
      Factory/Merchant/MerchantFactoryInterface.php
  23. +23
    -0
      Factory/Newsletter/NewsletterFactory.php
  24. +18
    -0
      Factory/Order/OrderPaymentFactory.php
  25. +8
    -0
      Factory/Order/OrderPaymentFactoryInterface.php
  26. +18
    -0
      Factory/Order/OrderProductFactory.php
  27. +8
    -0
      Factory/Order/OrderProductFactoryInterface.php
  28. +18
    -0
      Factory/Order/OrderProductReductionCatalogFactory.php
  29. +8
    -0
      Factory/Order/OrderProductReductionCatalogFactoryInterface.php
  30. +18
    -0
      Factory/Order/OrderProductRefundFactory.php
  31. +8
    -0
      Factory/Order/OrderProductRefundFactoryInterface.php
  32. +18
    -0
      Factory/Order/OrderReductionCartFactory.php
  33. +7
    -0
      Factory/Order/OrderReductionCartFactoryInterface.php
  34. +18
    -0
      Factory/Order/OrderReductionCreditFactory.php
  35. +8
    -0
      Factory/Order/OrderReductionCreditFactoryInterface.php
  36. +18
    -0
      Factory/Order/OrderRefundFactory.php
  37. +8
    -0
      Factory/Order/OrderRefundFactoryInterface.php
  38. +26
    -0
      Factory/Order/OrderShopFactory.php
  39. +8
    -0
      Factory/Order/OrderShopFactoryInterface.php
  40. +18
    -0
      Factory/Order/OrderStatusFactory.php
  41. +8
    -0
      Factory/Order/OrderStatusFactoryInterface.php
  42. +18
    -0
      Factory/Order/OrderStatusHistoryFactory.php
  43. +8
    -0
      Factory/Order/OrderStatusHistoryFactoryInterface.php
  44. +23
    -0
      Factory/PointSale/PointSaleFactory.php
  45. +8
    -0
      Factory/PointSale/PointSaleFactoryInterface.php
  46. +26
    -0
      Factory/Product/ProductCategoryFactory.php
  47. +8
    -0
      Factory/Product/ProductCategoryFactoryInterface.php
  48. +18
    -0
      Factory/Product/ProductFactory.php
  49. +8
    -0
      Factory/Product/ProductFactoryInterface.php
  50. +26
    -0
      Factory/Product/ProductFamilyFactory.php
  51. +8
    -0
      Factory/Product/ProductFamilyFactoryInterface.php
  52. +23
    -0
      Factory/Reduction/ReductionCartFactory.php
  53. +8
    -0
      Factory/Reduction/ReductionCartFactoryInterface.php
  54. +23
    -0
      Factory/Reduction/ReductionCatalogFactory.php
  55. +8
    -0
      Factory/Reduction/ReductionCatalogFactoryInterface.php
  56. +23
    -0
      Factory/Reduction/ReductionCreditFactory.php
  57. +8
    -0
      Factory/Reduction/ReductionCreditFactoryInterface.php
  58. +24
    -0
      Factory/Section/SectionFactory.php
  59. +8
    -0
      Factory/Section/SectionFactoryInterface.php
  60. +3
    -2
      Factory/Setting/SectionSettingFactory.php
  61. +21
    -0
      Factory/Site/NewsFactory.php
  62. +24
    -0
      Factory/Site/PageFactory.php
  63. +2
    -1
      Factory/Ticket/TicketFactory.php
  64. +23
    -0
      Factory/User/GroupUserFactory.php
  65. +8
    -0
      Factory/User/GroupUserFactoryInterface.php
  66. +16
    -0
      Factory/User/UserFactory.php
  67. +18
    -0
      Factory/User/VisitorFactory.php
  68. +8
    -0
      Factory/User/VisitorFactoryInterface.php
  69. +0
    -8
      Model/Credit/CreditConfigInterface.php
  70. +0
    -101
      Model/Credit/CreditConfigModel.php
  71. +0
    -19
      Model/Merchant/MerchantModel.php
  72. +0
    -8
      Model/PointSale/PointSaleDayInfoInterface.php
  73. +0
    -81
      Model/PointSale/PointSaleDayInfoModel.php
  74. +0
    -37
      Model/PointSale/PointSaleModel.php
  75. +0
    -24
      Repository/AbstractRepositoryQuery.php
  76. +7
    -10
      Repository/Address/AddressRepository.php
  77. +17
    -0
      Repository/Address/AddressRepositoryQuery.php
  78. +13
    -0
      Repository/Address/AddressStore.php
  79. +4
    -14
      Repository/Config/TaxRateRepository.php
  80. +14
    -0
      Repository/Config/TaxRateRepositoryQuery.php
  81. +13
    -0
      Repository/Config/TaxRateStore.php
  82. +4
    -15
      Repository/Config/UnitRepository.php
  83. +14
    -0
      Repository/Config/UnitRepositoryQuery.php
  84. +13
    -0
      Repository/Config/UnitStore.php
  85. +0
    -21
      Repository/Credit/CreditConfigRepository.php
  86. +4
    -15
      Repository/Credit/CreditHistoryRepository.php
  87. +14
    -0
      Repository/Credit/CreditHistoryRepositoryQuery.php
  88. +13
    -0
      Repository/Credit/CreditHistoryStore.php
  89. +4
    -10
      Repository/File/DocumentRepository.php
  90. +17
    -0
      Repository/File/DocumentRepositoryQuery.php
  91. +13
    -0
      Repository/File/DocumentStore.php
  92. +0
    -21
      Repository/Merchant/MerchantConfigRepository.php
  93. +4
    -10
      Repository/Merchant/MerchantRepository.php
  94. +14
    -0
      Repository/Merchant/MerchantRepositoryQuery.php
  95. +13
    -0
      Repository/Merchant/MerchantStore.php
  96. +1
    -1
      Repository/MerchantRepositoryQueryTrait.php
  97. +11
    -0
      Repository/Newsletter/NewsletterRepositoryQuery.php
  98. +4
    -10
      Repository/Order/OrderPaymentRepository.php
  99. +14
    -0
      Repository/Order/OrderPaymentRepositoryQuery.php
  100. +13
    -0
      Repository/Order/OrderPaymentStore.php

+ 14
- 0
Controller/AdminControllerTrait.php Ver fichero

@@ -5,6 +5,7 @@ namespace Lc\CaracoleBundle\Controller;
use Doctrine\ORM\QueryBuilder;
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection;
use EasyCorp\Bundle\EasyAdminBundle\Collection\FilterCollection;
use EasyCorp\Bundle\EasyAdminBundle\Config\KeyValueStore;
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface;
use Lc\CaracoleBundle\Doctrine\Extension\FilterMultipleMerchantsInterface;
use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface;
@@ -28,6 +29,19 @@ trait AdminControllerTrait
'user_merchant_factory' => UserMerchantFactory::class,
]);
}

public function configureResponseParameters(KeyValueStore $responseParameters): KeyValueStore
{
$responseParameters = parent::configureResponseParameters($responseParameters);

// affichage du filtre sur section
if($this->isInstanceOf(FilterSectionInterface::class)) {
$responseParameters->set('display_switch_section', true);
}

return $responseParameters;
}

public function createIndexQueryBuilder(
SearchDto $searchDto,
EntityDto $entityDto,

+ 1
- 1
Controller/Credit/CreditHistoryAdminController.php Ver fichero

@@ -84,7 +84,7 @@ abstract class CreditHistoryAdminController extends AbstractAdminController

public function configureCrud(Crud $crud): Crud
{
$crud->overrideTemplate('crud/index', '@LcCaracole/admin/credit/credit_history_index.html.twig');
$crud->overrideTemplate('crud/index', '@LcCaracole/admin/credit/index_credithistory.html.twig');

return $crud;
}

+ 4
- 0
Controller/Merchant/FavoriteMerchantController.php Ver fichero

@@ -8,9 +8,13 @@ use Lc\CaracoleBundle\Form\Merchant\SwitchMerchantFormType;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Routing\Annotation\Route;

class FavoriteMerchantController extends AbstractController
{
/**
* @Route("/merchant/favorite", name="carac_merchant_favorite")
*/
public function favoriteMerchant(Request $request, Security $security, EntityManagerInterface $em)
{
$user = $security->getUser() ;

+ 4
- 1
Controller/Merchant/SwitchMerchantController.php Ver fichero

@@ -7,10 +7,13 @@ use Lc\CaracoleBundle\Form\Merchant\SwitchMerchantFormType;
use Lc\CaracoleBundle\Repository\Merchant\MerchantRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;

class SwitchMerchantController extends AbstractController
{

/**
* @Route("/merchant/switch", name="carac_merchant_switch")
*/
public function switchMerchant(Request $request, MerchantRepository $merchantRepository)
{
$form = $this->createForm(SwitchMerchantFormType::class);

+ 4
- 0
Controller/Section/SwitchSectionAdminController.php Ver fichero

@@ -8,10 +8,14 @@ use Lc\CaracoleBundle\Repository\Section\SectionRepository;
use Lc\CaracoleBundle\Resolver\MerchantResolver;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;

class SwitchSectionAdminController extends AbstractController
{

/**
* @Route("/section/switch", name="carac_section_switch")
*/
public function switchSection(
Request $request,
EntityManagerInterface $em,

+ 19
- 9
Controller/Setting/SettingAdminController.php Ver fichero

@@ -15,6 +15,7 @@ use Lc\SovBundle\Form\Setting\SiteSettingsFormType;
use Lc\SovBundle\Repository\Site\SiteRepository;
use Lc\SovBundle\Translation\TranslatorAdmin;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;

class SettingAdminController extends SovSettingController
{
@@ -47,11 +48,17 @@ class SettingAdminController extends SovSettingController
$this->siteRepository = $siteRepository;
}

/**
* @Route("/admin/setting/merchant", name="carac_admin_setting_merchant")
*/
public function manageMerchant(Request $request)
{
return $this->manage($request, 'merchant');
}

/**
* @Route("/admin/setting/section", name="carac_admin_setting_section")
*/
public function manageSection(Request $request)
{
return $this->manage($request, 'section');
@@ -86,25 +93,28 @@ class SettingAdminController extends SovSettingController
}

return $this->render(
'@LcCaracole/admin/setting/' . $type . '.html.twig',
[
'resolver' => $resolver,
'setting_definition' => $settingDefinition,
'form' => $form->createView()
]
'@LcCaracole/admin/setting/edit_' . $type . '.html.twig',
[
'display_switch_section' => ($type == 'section') ? true : false,
'resolver' => $resolver,
'setting_definition' => $settingDefinition,
'form' => $form->createView()
]
);
}
}

/**
* @Route("/admin/setting/site2", name="carac_admin_setting_site")
*/
public function manageGlobal(Request $request)
{
$site = $this->siteRepository->findOneByDevAlias('default') ;
$site = $this->siteRepository->findOneByDevAlias('default');
$form = $this->createForm(SiteSettingsFormType::class, $site);

$form->handleRequest($request);

if ($form->isSubmitted() && $form->isValid()) {

$this->em->update($site);
$this->em->flush();

@@ -112,7 +122,7 @@ class SettingAdminController extends SovSettingController
}

return $this->render(
'@LcCaracole/admin/setting/global.html.twig' ,
'@LcCaracole/admin/setting/edit_site.html.twig',
[
'setting_definition' => $this->siteSettingDefinition,
'form' => $form->createView()

+ 1
- 0
Controller/Ticket/TicketAdminController.php Ver fichero

@@ -2,6 +2,7 @@

namespace Lc\CaracoleBundle\Controller\Ticket;

use EasyCorp\Bundle\EasyAdminBundle\Config\KeyValueStore;
use Lc\CaracoleBundle\Controller\AdminControllerTrait;
use Lc\SovBundle\Controller\Ticket\TicketAdminController as SovTicketAdminController;


+ 1
- 1
Controller/User/UserMerchantAdminController.php Ver fichero

@@ -167,7 +167,7 @@ abstract class UserMerchantAdminController extends AbstractAdminController
}

return $this->render(
'@LcCaracole/admin/user/usermerchant_new.html.twig',
'@LcCaracole/admin/user/new_usermerchant.html.twig',
[
'form' => $form->createView(),
]

+ 1
- 4
EventSubscriber/SettingEventSubscriber.php Ver fichero

@@ -6,15 +6,12 @@ use Doctrine\ORM\EntityManagerInterface;
use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface;
use Lc\CaracoleBundle\Factory\Setting\MerchantSettingFactory;
use Lc\CaracoleBundle\Factory\Setting\SectionSettingFactory;
use Lc\CaracoleBundle\Factory\User\UserMerchantFactory;
use Lc\CaracoleBundle\Model\Section\SectionInterface;
use Lc\CaracoleBundle\Repository\Merchant\MerchantRepository;
use Lc\CaracoleBundle\Definition\SectionSettingDefinitionInterface;
use Lc\CaracoleBundle\Repository\Merchant\MerchantRepository;
use Lc\CaracoleBundle\Repository\Section\SectionRepository;
use Lc\CaracoleBundle\Resolver\MerchantResolver;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Security\Core\Security;

class SettingEventSubscriber implements EventSubscriberInterface
{

+ 1
- 1
EventSubscriber/User/UserRolesEventSubscriber.php Ver fichero

@@ -50,7 +50,7 @@ class UserRolesEventSubscriber implements EventSubscriberInterface
return;
}
if ($this->setUserRoles($event->getRequest())) {
$response = new RedirectResponse($this->router->generate('admin_dashboard'));
$response = new RedirectResponse($this->router->generate('app_admin_dashboard'));
$event->setResponse($response);
}
}

+ 23
- 0
Factory/Address/AddressFactory.php Ver fichero

@@ -0,0 +1,23 @@
<?php

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/Address/AddressFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Address;

interface AddressFactoryInterface
{

}

+ 18
- 0
Factory/Config/TaxRateFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Config;

use App\Entity\Config\TaxRate;
use Lc\CaracoleBundle\Model\Config\TaxRateInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class TaxRateFactory extends AbstractFactory implements TaxRateFactoryInterface
{
public function create(): TaxRateInterface
{
$taxRate = new TaxRate();

return $taxRate;
}

}

+ 8
- 0
Factory/Config/TaxRateFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Config;

interface TaxRateFactoryInterface
{

}

+ 18
- 0
Factory/Config/UnitFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Config;

use App\Entity\Config\Unit;
use Lc\CaracoleBundle\Model\Config\UnitInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class UnitFactory extends AbstractFactory implements UnitFactoryInterface
{
public function create(): UnitInterface
{
$unit = new Unit();

return $unit;
}

}

+ 8
- 0
Factory/Config/UnitFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Config;

interface UnitFactoryInterface
{

}

+ 19
- 0
Factory/Credit/CreditHistoryFactory.php Ver fichero

@@ -0,0 +1,19 @@
<?php

namespace Lc\CaracoleBundle\Factory\Credit;

use App\Entity\Credit\CreditHistory;
use Lc\CaracoleBundle\Factory\CreditHistory\CreditHistoryFactoryInterface;
use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class CreditHistoryFactory extends AbstractFactory implements CreditHistoryFactoryInterface
{
public function create(): CreditHistoryInterface
{
$creditHistory = new CreditHistory();

return $creditHistory;
}

}

+ 8
- 0
Factory/Credit/CreditHistoryFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Credit;

interface CreditHistoryFactoryInterface
{

}

+ 23
- 0
Factory/File/DocumentFactory.php Ver fichero

@@ -0,0 +1,23 @@
<?php

namespace Lc\CaracoleBundle\Factory\File;

use App\Entity\File\Document;
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\CaracoleBundle\Model\File\DocumentInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class DocumentFactory extends AbstractFactory implements DocumentFactoryInterface
{
use MerchantFactoryTrait;

public function create(): DocumentInterface
{
$document = new Document();

$document->setMerchant($this->merchant);

return $document;
}

}

+ 8
- 0
Factory/File/DocumentFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\File;

interface DocumentFactoryInterface
{

}

+ 18
- 0
Factory/Merchant/MerchantFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Merchant;

use App\Entity\Merchant\Merchant;
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class MerchantFactory extends AbstractFactory implements MerchantFactoryInterface
{
public function create(): MerchantInterface
{
$merchant = new Merchant();

return $merchant;
}

}

+ 8
- 0
Factory/Merchant/MerchantFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Merchant;

interface MerchantFactoryInterface
{

}

+ 23
- 0
Factory/Newsletter/NewsletterFactory.php Ver fichero

@@ -0,0 +1,23 @@
<?php

namespace Lc\CaracoleBundle\Factory\Newsletter;

use App\Entity\Newsletter\Newsletter;
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\SovBundle\Model\Newsletter\NewsletterInterface;
use Lc\SovBundle\Factory\Newsletter\NewsletterFactory as SovNewsletterFactory;

class NewsletterFactory extends SovNewsletterFactory
{
use MerchantFactoryTrait;

public function create(): NewsletterInterface
{
$newsletter = parent::create();

$newsletter->setMerchant($this->merchant);

return $newsletter;
}

}

+ 18
- 0
Factory/Order/OrderPaymentFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderPayment;
use Lc\CaracoleBundle\Model\Order\OrderPaymentInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderPaymentFactory extends AbstractFactory implements OrderPaymentFactoryInterface
{
public function create(): OrderPaymentInterface
{
$orderPayment = new OrderPayment();

return $orderPayment;
}

}

+ 8
- 0
Factory/Order/OrderPaymentFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderPaymentFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderProductFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderProduct;
use Lc\CaracoleBundle\Model\Order\OrderProductInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderProductFactory extends AbstractFactory implements OrderProductFactoryInterface
{
public function create(): OrderProductInterface
{
$orderProduct = new OrderProduct();

return $orderProduct;
}

}

+ 8
- 0
Factory/Order/OrderProductFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderProductFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderProductReductionCatalogFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderProductReductionCatalog;
use Lc\CaracoleBundle\Model\Order\OrderProductReductionCatalogInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderProductReductionCatalogFactory extends AbstractFactory implements OrderProductReductionCatalogFactoryInterface
{
public function create(): OrderProductReductionCatalogInterface
{
$orderProductReductionCatalog = new OrderProductReductionCatalog();

return $orderProductReductionCatalog;
}

}

+ 8
- 0
Factory/Order/OrderProductReductionCatalogFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderProductReductionCatalogFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderProductRefundFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderProductRefund;
use Lc\CaracoleBundle\Model\Order\OrderProductRefundInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderProductRefundFactory extends AbstractFactory implements OrderProductRefundFactoryInterface
{
public function create(): OrderProductRefundInterface
{
$orderProductRefund = new OrderProductRefund();

return $orderProductRefund;
}

}

+ 8
- 0
Factory/Order/OrderProductRefundFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderProductRefundFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderReductionCartFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderReductionCart;
use Lc\CaracoleBundle\Model\Order\OrderReductionCartInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderReductionCartFactory extends AbstractFactory implements OrderReductionCartFactoryInterface
{
public function create(): OrderReductionCartInterface
{
$orderReductionCart = new OrderReductionCart();

return $orderReductionCart;
}

}

+ 7
- 0
Factory/Order/OrderReductionCartFactoryInterface.php Ver fichero

@@ -0,0 +1,7 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderReductionCartFactoryInterface{

}

+ 18
- 0
Factory/Order/OrderReductionCreditFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderReductionCredit;
use Lc\CaracoleBundle\Model\Order\OrderReductionCreditInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderReductionCreditFactory extends AbstractFactory implements OrderReductionCreditFactoryInterface
{
public function create(): OrderReductionCreditInterface
{
$orderReductionCredit = new OrderReductionCredit();

return $orderReductionCredit;
}

}

+ 8
- 0
Factory/Order/OrderReductionCreditFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderReductionCreditFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderRefundFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderRefund;
use Lc\CaracoleBundle\Model\Order\OrderRefundInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderRefundFactory extends AbstractFactory implements OrderRefundFactoryInterface
{
public function create(): OrderRefundInterface
{
$orderRefund = new OrderRefund();

return $orderRefund;
}

}

+ 8
- 0
Factory/Order/OrderRefundFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderRefundFactoryInterface
{

}

+ 26
- 0
Factory/Order/OrderShopFactory.php Ver fichero

@@ -0,0 +1,26 @@
<?php

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

}

+ 8
- 0
Factory/Order/OrderShopFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderShopFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderStatusFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderStatus;
use Lc\CaracoleBundle\Model\Order\OrderStatusInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderStatusFactory extends AbstractFactory implements OrderStatusFactoryInterface
{
public function create(): OrderStatusInterface
{
$orderStatus = new OrderStatus();

return $orderStatus;
}

}

+ 8
- 0
Factory/Order/OrderStatusFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderStatusFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderStatusHistoryFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderStatusHistory;
use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderStatusHistoryFactory extends AbstractFactory implements OrderStatusHistoryFactoryInterface
{
public function create(): OrderStatusHistoryInterface
{
$orderStatusHistory = new OrderStatusHistory();

return $orderStatusHistory;
}

}

+ 8
- 0
Factory/Order/OrderStatusHistoryFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderStatusHistoryFactoryInterface
{

}

+ 23
- 0
Factory/PointSale/PointSaleFactory.php Ver fichero

@@ -0,0 +1,23 @@
<?php

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/PointSale/PointSaleFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\PointSale;

interface PointSaleFactoryInterface
{

}

+ 26
- 0
Factory/Product/ProductCategoryFactory.php Ver fichero

@@ -0,0 +1,26 @@
<?php

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/ProductCategoryFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Product;

interface ProductCategoryFactoryInterface
{

}

+ 18
- 0
Factory/Product/ProductFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Product;

use App\Entity\Product\Product;
use Lc\CaracoleBundle\Model\Product\ProductInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class ProductFactory extends AbstractFactory implements ProductFactoryInterface
{
public function create(): ProductInterface
{
$product = new Product();

return $product;
}

}

+ 8
- 0
Factory/Product/ProductFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Product;

interface ProductFactoryInterface
{

}

+ 26
- 0
Factory/Product/ProductFamilyFactory.php Ver fichero

@@ -0,0 +1,26 @@
<?php

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

}

+ 8
- 0
Factory/Product/ProductFamilyFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Product;

interface ProductFamilyFactoryInterface
{

}

+ 23
- 0
Factory/Reduction/ReductionCartFactory.php Ver fichero

@@ -0,0 +1,23 @@
<?php

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

}

+ 8
- 0
Factory/Reduction/ReductionCartFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Reduction;

interface ReductionCartFactoryInterface
{

}

+ 23
- 0
Factory/Reduction/ReductionCatalogFactory.php Ver fichero

@@ -0,0 +1,23 @@
<?php

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

}

+ 8
- 0
Factory/Reduction/ReductionCatalogFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Reduction;

interface ReductionCatalogFactoryInterface
{

}

+ 23
- 0
Factory/Reduction/ReductionCreditFactory.php Ver fichero

@@ -0,0 +1,23 @@
<?php

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

}

+ 8
- 0
Factory/Reduction/ReductionCreditFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Reduction;

interface ReductionCreditFactoryInterface
{

}

+ 24
- 0
Factory/Section/SectionFactory.php Ver fichero

@@ -0,0 +1,24 @@
<?php

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

}

+ 8
- 0
Factory/Section/SectionFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Section;

interface SectionFactoryInterface
{

}

+ 3
- 2
Factory/Setting/SectionSettingFactory.php Ver fichero

@@ -4,17 +4,18 @@ namespace Lc\CaracoleBundle\Factory\Setting;

use App\Entity\Setting\SectionSetting;
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\CaracoleBundle\Factory\SectionFactoryTrait;
use Lc\SovBundle\Factory\AbstractFactory;

class SectionSettingFactory extends AbstractFactory
{
use MerchantFactoryTrait;
use SectionFactoryTrait;

public function create()
{
$sectionSetting = new SectionSetting();

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

return $sectionSetting;
}

+ 21
- 0
Factory/Site/NewsFactory.php Ver fichero

@@ -0,0 +1,21 @@
<?php

namespace Lc\CaracoleBundle\Factory\Site;

use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\SovBundle\Factory\Site\NewsFactory as SovNewsFactory;
use Lc\SovBundle\Model\Site\NewsInterface;

class NewsFactory extends SovNewsFactory
{
use MerchantFactoryTrait;

public function create(): NewsInterface
{
$news = parent::create();

$news->setMerchant($this->merchant);

return $news;
}
}

+ 24
- 0
Factory/Site/PageFactory.php Ver fichero

@@ -0,0 +1,24 @@
<?php

namespace Lc\CaracoleBundle\Factory\Site;

use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\CaracoleBundle\Factory\SectionFactoryTrait;
use Lc\SovBundle\Factory\Site\PageFactory as SovPageFactory;
use Lc\SovBundle\Model\Site\PageInterface;

class PageFactory extends SovPageFactory
{
use MerchantFactoryTrait;
use SectionFactoryTrait;

public function create(): PageInterface
{
$page = parent::create();

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

return $page;
}
}

+ 2
- 1
Factory/Ticket/TicketFactory.php Ver fichero

@@ -5,12 +5,13 @@ namespace Lc\CaracoleBundle\Factory\Ticket;
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\CaracoleBundle\Factory\SectionFactoryTrait;
use Lc\SovBundle\Factory\Ticket\TicketFactory as SovTicketFactory;
use Lc\SovBundle\Model\Ticket\TicketInterface;

class TicketFactory extends SovTicketFactory
{
use MerchantFactoryTrait;

public function create()
public function create(): TicketInterface
{
$ticket = parent::create();


+ 23
- 0
Factory/User/GroupUserFactory.php Ver fichero

@@ -0,0 +1,23 @@
<?php

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

}

+ 8
- 0
Factory/User/GroupUserFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\User;

interface GroupUserFactoryInterface
{

}

+ 16
- 0
Factory/User/UserFactory.php Ver fichero

@@ -0,0 +1,16 @@
<?php

namespace Lc\CaracoleBundle\Factory\User;

use Lc\SovBundle\Factory\User\UserFactory as SovUserFactory;
use Lc\SovBundle\Model\User\UserInterface;

class UserFactory extends SovUserFactory
{
public function create(): UserInterface
{
$user = parent::create();

return $user;
}
}

+ 18
- 0
Factory/User/VisitorFactory.php Ver fichero

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\User;

use App\Entity\User\Visitor;
use Lc\CaracoleBundle\Model\User\VisitorInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class VisitorFactory extends AbstractFactory implements VisitorFactoryInterface
{
public function create(): VisitorInterface
{
$visitor = new Visitor();

return $visitor;
}

}

+ 8
- 0
Factory/User/VisitorFactoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\User;

interface VisitorFactoryInterface
{

}

+ 0
- 8
Model/Credit/CreditConfigInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\CaracoleBundle\Model\Credit;

interface CreditConfigInterface
{

}

+ 0
- 101
Model/Credit/CreditConfigModel.php Ver fichero

@@ -1,101 +0,0 @@
<?php

namespace Lc\CaracoleBundle\Model\Credit;

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\MappedSuperclass()
*/
abstract class CreditConfigModel
{
/**
* @ORM\Column(type="boolean")
*/
protected $active;

/**
* @ORM\Column(type="float", nullable=true)
*/
protected $limitAmount;

/**
* @ORM\Column(type="float", nullable=true)
*/
protected $limitReminder;

/**
* @ORM\Column(type="string", length=31, nullable=true)
*/
protected $behavior;

/**
* @ORM\Column(type="boolean", nullable=true)
*/
protected $processOrderCheckedDefault;

public function __toString()
{
return '';
}

public function getActive(): ?bool
{
return $this->active;
}

public function setActive(bool $active): self
{
$this->active = $active;

return $this;
}

public function getLimitAmount(): ?float
{
return $this->limitAmount;
}

public function setLimitAmount(?float $limitAmount): self
{
$this->limitAmount = $limitAmount;

return $this;
}

public function getLimitReminder(): ?float
{
return $this->limitReminder;
}

public function setLimitReminder(?float $limitReminder): self
{
$this->limitReminder = $limitReminder;

return $this;
}

public function getBehavior(): ?string
{
return $this->behavior;
}

public function setBehavior(?string $behavior): self
{
$this->behavior = $behavior;

return $this;
}

public function getProcessOrderCheckedDefault(): ?bool
{
return $this->processOrderCheckedDefault;
}

public function setProcessOrderCheckedDefault(?bool $processOrderCheckedDefault): self
{
$this->processOrderCheckedDefault = $processOrderCheckedDefault;

return $this;
}
}

+ 0
- 19
Model/Merchant/MerchantModel.php Ver fichero

@@ -7,7 +7,6 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Model\Address\AddressInterface;
use Lc\CaracoleBundle\Model\Config\TaxRateInterface;
use Lc\CaracoleBundle\Model\Credit\CreditConfigInterface;
use Lc\SovBundle\Model\Newsletter\NewsletterInterface;
use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface;
use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface;
@@ -27,12 +26,6 @@ abstract class MerchantModel extends AbstractFullEntity

use EntitySettingTrait;

/**
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Credit\CreditConfigInterface", cascade={"persist", "remove"})
* @ORM\JoinColumn(nullable=true)
*/
protected $creditConfig;

/**
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Config\TaxRateInterface")
* @ORM\JoinColumn(nullable=false)
@@ -101,18 +94,6 @@ abstract class MerchantModel extends AbstractFullEntity
return $this->getTitle() ;
}

public function getCreditConfig(): ?CreditConfigInterface
{
return $this->creditConfig;
}

public function setCreditConfig(CreditConfigInterface $creditConfig): self
{
$this->creditConfig = $creditConfig;

return $this;
}

public function getTaxRate(): ?TaxRateInterface
{
return $this->taxRate;

+ 0
- 8
Model/PointSale/PointSaleDayInfoInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\CaracoleBundle\Model\PointSale;

interface PointSaleDayInfoInterface
{

}

+ 0
- 81
Model/PointSale/PointSaleDayInfoModel.php Ver fichero

@@ -1,81 +0,0 @@
<?php

namespace Lc\CaracoleBundle\Model\PointSale;

use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Pattern\AbstractLightEntity;

/**
* @ORM\MappedSuperclass()
*/
abstract class PointSaleDayInfoModel extends AbstractLightEntity
{
/**
* @ORM\Column(type="boolean")
*/
protected $active;

/**
* @ORM\Column(type="smallint")
*/
protected $day;

/**
* @ORM\Column(type="text", nullable=true)
*/
protected $description;

/**
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\PointSale\PointSaleInterface", inversedBy="pointSaleDayInfos")
* @ORM\JoinColumn(nullable=false)
*/
protected $pointSale;

public function getActive(): ?bool
{
return $this->active;
}

public function setActive(bool $active): self
{
$this->active = $active;

return $this;
}

public function getDay(): ?int
{
return $this->day;
}

public function setDay(int $day): self
{
$this->day = $day;

return $this;
}

public function getDescription(): ?string
{
return $this->description;
}

public function setDescription(?string $description): self
{
$this->description = $description;

return $this;
}

public function getPointSale(): ?PointSaleInterface
{
return $this->pointSale;
}

public function setPointSale(?PointSaleInterface $pointSale): self
{
$this->pointSale = $pointSale;

return $this;
}
}

+ 0
- 37
Model/PointSale/PointSaleModel.php Ver fichero

@@ -32,11 +32,6 @@ abstract class PointSaleModel extends AbstractFullEntity implements FilterMultip
*/
protected $code;

/**
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\PointSale\PointSaleDayInfoInterface", mappedBy="pointSale", orphanRemoval=true)
*/
protected $pointSaleDayInfos;

/**
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Address\AddressInterface", inversedBy="pointSale", cascade={"persist", "remove"})
* @ORM\JoinColumn(nullable=false)
@@ -52,7 +47,6 @@ abstract class PointSaleModel extends AbstractFullEntity implements FilterMultip
public function __construct()
{
$this->merchants = new ArrayCollection();
$this->pointSaleDayInfos = new ArrayCollection();
$this->userPointSales = new ArrayCollection();
}

@@ -104,37 +98,6 @@ abstract class PointSaleModel extends AbstractFullEntity implements FilterMultip
return $this;
}

/**
* @return Collection|PointSaleDayInfoInterface[]
*/
public function getPointSaleDayInfos(): Collection
{
return $this->pointSaleDayInfos;
}

public function addPointSaleDayInfo(PointSaleDayInfoInterface $pointSaleDayInfo): self
{
if (!$this->pointSaleDayInfos->contains($pointSaleDayInfo)) {
$this->pointSaleDayInfos[] = $pointSaleDayInfo;
$pointSaleDayInfo->setPointSale($this);
}

return $this;
}

public function removePointSaleDayInfo(PointSaleDayInfoInterface $pointSaleDayInfo): self
{
if ($this->pointSaleDayInfos->contains($pointSaleDayInfo)) {
$this->pointSaleDayInfos->removeElement($pointSaleDayInfo);
// set the owning side to null (unless already changed)
if ($pointSaleDayInfo->getPointSale() === $this) {
$pointSaleDayInfo->setPointSale(null);
}
}

return $this;
}

public function getAddress(): ?AddressInterface
{
return $this->address;

+ 0
- 24
Repository/AbstractRepositoryQuery.php Ver fichero

@@ -1,24 +0,0 @@
<?php

namespace Lc\CaracoleBundle\Repository;

use Lc\SovBundle\Repository\AbstractRepositoryQuery as BaseAbstractRepositoryQuery;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\QueryBuilder;
use Knp\Component\Pager\PaginatorInterface;
use Lc\CaracoleBundle\Container\MyContainer;

abstract class AbstractRepositoryQuery extends BaseAbstractRepositoryQuery
{
public function __construct(
MyContainer $container,
ServiceEntityRepository $repository,
string $id,
PaginatorInterface $paginator = null
)
{
$this->container = $container;

parent::__construct($repository, $id, $paginator);
}
}

+ 7
- 10
Repository/Address/AddressRepository.php Ver fichero

@@ -2,20 +2,17 @@

namespace Lc\CaracoleBundle\Repository\Address;

use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use App\Entity\Address\Address;
use Doctrine\Persistence\ManagerRegistry;
use Lc\CaracoleBundle\Model\Address\AddressInterface;
use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
use Lc\SovBundle\Repository\AbstractRepository;

/**
* @method AddressInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method AddressInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method AddressInterface[] findAll()
* @method AddressInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class AddressRepository extends ServiceEntityRepository
class AddressRepository extends AbstractRepository
{
use MerchantRepositoryQueryTrait;

public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, AddressInterface::class);
parent::__construct($registry, Address::class);
}
}

+ 17
- 0
Repository/Address/AddressRepositoryQuery.php Ver fichero

@@ -0,0 +1,17 @@
<?php

namespace Lc\CaracoleBundle\Repository\Address;

use Knp\Component\Pager\PaginatorInterface;
use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
use Lc\SovBundle\Repository\AbstractRepositoryQuery;

class AddressRepositoryQuery extends AbstractRepositoryQuery
{
use MerchantRepositoryQueryTrait;

public function __construct(AddressRepository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, 'r', $paginator);
}
}

+ 13
- 0
Repository/Address/AddressStore.php Ver fichero

@@ -0,0 +1,13 @@
<?php

namespace Lc\CaracoleBundle\Repository\Address;

class AddressStore
{
protected AddressRepositoryQuery $query;

public function __construct(AddressRepositoryQuery $query)
{
$this->query = $query;
}
}

+ 4
- 14
Repository/Config/TaxRateRepository.php Ver fichero

@@ -2,24 +2,14 @@

namespace Lc\CaracoleBundle\Repository\Config;

use Lc\CaracoleBundle\Model\Config\TaxRateInterface;
use Lc\CaracoleBundle\Repository\RepositoryTrait;
use App\Entity\Config\TaxRate;
use Doctrine\Persistence\ManagerRegistry;
use Lc\SovBundle\Repository\AbstractRepository;

/**
* @method TaxRateInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method TaxRateInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method TaxRateInterface[] findAll()
* @method TaxRateInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class TaxRateRepository extends AbstractRepository
{
use RepositoryTrait;

public function getInterfaceClass()
public function __construct(ManagerRegistry $registry)
{
return TaxRateInterface::class;
parent::__construct($registry, TaxRate::class);
}


}

+ 14
- 0
Repository/Config/TaxRateRepositoryQuery.php Ver fichero

@@ -0,0 +1,14 @@
<?php

namespace Lc\CaracoleBundle\Repository\Config;

use Knp\Component\Pager\PaginatorInterface;
use Lc\SovBundle\Repository\AbstractRepositoryQuery;

class TaxRateRepositoryQuery extends AbstractRepositoryQuery
{
public function __construct(TaxRateRepository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, 'r', $paginator);
}
}

+ 13
- 0
Repository/Config/TaxRateStore.php Ver fichero

@@ -0,0 +1,13 @@
<?php

namespace Lc\CaracoleBundle\Repository\Config;

class TaxRateStore
{
protected TaxRateRepositoryQuery $query;

public function __construct(TaxRateRepositoryQuery $query)
{
$this->query = $query;
}
}

+ 4
- 15
Repository/Config/UnitRepository.php Ver fichero

@@ -2,25 +2,14 @@

namespace Lc\CaracoleBundle\Repository\Config;

use Lc\CaracoleBundle\Model\Config\TaxRateInterface;
use Lc\CaracoleBundle\Model\Config\UnitInterface;
use Lc\CaracoleBundle\Repository\RepositoryTrait;
use App\Entity\Config\Unit;
use Doctrine\Persistence\ManagerRegistry;
use Lc\SovBundle\Repository\AbstractRepository;

/**
* @method UnitInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method UnitInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method UnitInterface[] findAll()
* @method UnitInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class UnitRepository extends AbstractRepository
{
use RepositoryTrait;

public function getInterfaceClass()
public function __construct(ManagerRegistry $registry)
{
return UnitInterface::class;
parent::__construct($registry, Unit::class);
}


}

+ 14
- 0
Repository/Config/UnitRepositoryQuery.php Ver fichero

@@ -0,0 +1,14 @@
<?php

namespace Lc\CaracoleBundle\Repository\Config;

use Knp\Component\Pager\PaginatorInterface;
use Lc\SovBundle\Repository\AbstractRepositoryQuery;

class UnitRepositoryQuery extends AbstractRepositoryQuery
{
public function __construct(UnitRepository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, 'r', $paginator);
}
}

+ 13
- 0
Repository/Config/UnitStore.php Ver fichero

@@ -0,0 +1,13 @@
<?php

namespace Lc\CaracoleBundle\Repository\Config;

class UnitStore
{
protected UnitRepositoryQuery $query;

public function __construct(UnitRepositoryQuery $query)
{
$this->query = $query;
}
}

+ 0
- 21
Repository/Credit/CreditConfigRepository.php Ver fichero

@@ -1,21 +0,0 @@
<?php

namespace Lc\CaracoleBundle\Repository\Credit;

use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
use Lc\CaracoleBundle\Model\Credit\CreditConfigInterface;

/**
* @method CreditConfigInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method CreditConfigInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method CreditConfigInterface[] findAll()
* @method CreditConfigInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class CreditConfigRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, CreditConfigInterface::class);
}
}

+ 4
- 15
Repository/Credit/CreditHistoryRepository.php Ver fichero

@@ -2,25 +2,14 @@

namespace Lc\CaracoleBundle\Repository\Credit;

use Lc\CaracoleBundle\Model\Config\TaxRateInterface;
use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface;
use Lc\CaracoleBundle\Repository\RepositoryTrait;
use App\Entity\Credit\CreditHistory;
use Doctrine\Persistence\ManagerRegistry;
use Lc\SovBundle\Repository\AbstractRepository;

/**
* @method CreditHistoryInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method CreditHistoryInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method CreditHistoryInterface[] findAll()
* @method CreditHistoryInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class CreditHistoryRepository extends AbstractRepository
{
use RepositoryTrait;

public function getInterfaceClass()
public function __construct(ManagerRegistry $registry)
{
return CreditHistoryInterface::class;
parent::__construct($registry, CreditHistory::class);
}


}

+ 14
- 0
Repository/Credit/CreditHistoryRepositoryQuery.php Ver fichero

@@ -0,0 +1,14 @@
<?php

namespace Lc\CaracoleBundle\Repository\Credit;

use Knp\Component\Pager\PaginatorInterface;
use Lc\SovBundle\Repository\AbstractRepositoryQuery;

class CreditHistoryRepositoryQuery extends AbstractRepositoryQuery
{
public function __construct(CreditHistoryRepository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, 'r', $paginator);
}
}

+ 13
- 0
Repository/Credit/CreditHistoryStore.php Ver fichero

@@ -0,0 +1,13 @@
<?php

namespace Lc\CaracoleBundle\Repository\Credit;

class CreditHistoryStore
{
protected CreditHistoryRepositoryQuery $query;

public function __construct(CreditHistoryRepositoryQuery $query)
{
$this->query = $query;
}
}

+ 4
- 10
Repository/File/DocumentRepository.php Ver fichero

@@ -2,20 +2,14 @@

namespace Lc\CaracoleBundle\Repository\File;

use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use App\Entity\File\Document;
use Doctrine\Persistence\ManagerRegistry;
use Lc\CaracoleBundle\Model\File\DocumentInterface;
use Lc\SovBundle\Repository\AbstractRepository;

/**
* @method DocumentInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method DocumentInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method DocumentInterface[] findAll()
* @method DocumentInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class DocumentRepository extends ServiceEntityRepository
class DocumentRepository extends AbstractRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, DocumentInterface::class);
parent::__construct($registry, Document::class);
}
}

+ 17
- 0
Repository/File/DocumentRepositoryQuery.php Ver fichero

@@ -0,0 +1,17 @@
<?php

namespace Lc\CaracoleBundle\Repository\File;

use Knp\Component\Pager\PaginatorInterface;
use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
use Lc\SovBundle\Repository\AbstractRepositoryQuery;

class DocumentRepositoryQuery extends AbstractRepositoryQuery
{
use MerchantRepositoryQueryTrait;

public function __construct(DocumentRepository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, 'r', $paginator);
}
}

+ 13
- 0
Repository/File/DocumentStore.php Ver fichero

@@ -0,0 +1,13 @@
<?php

namespace Lc\CaracoleBundle\Repository\File;

class DocumentStore
{
protected DocumentRepositoryQuery $query;

public function __construct(DocumentRepositoryQuery $query)
{
$this->query = $query;
}
}

+ 0
- 21
Repository/Merchant/MerchantConfigRepository.php Ver fichero

@@ -1,21 +0,0 @@
<?php

namespace Lc\CaracoleBundle\Repository\Merchant;

use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
use Lc\CaracoleBundle\Model\Merchant\MerchantConfigInterface;

/**
* @method MerchantConfigInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method MerchantConfigInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method MerchantConfigInterface[] findAll()
* @method MerchantConfigInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class MerchantConfigRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, MerchantConfigInterface::class);
}
}

+ 4
- 10
Repository/Merchant/MerchantRepository.php Ver fichero

@@ -2,20 +2,14 @@

namespace Lc\CaracoleBundle\Repository\Merchant;

use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use App\Entity\Merchant\Merchant;
use Doctrine\Persistence\ManagerRegistry;
use Lc\SovBundle\Repository\AbstractRepository;

/**
* @method MerchantInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method MerchantInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method MerchantInterface[] findAll()
* @method MerchantInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class MerchantRepository extends AbstractRepository
{
public function getInterfaceClass()
public function __construct(ManagerRegistry $registry)
{
return MerchantInterface::class;
parent::__construct($registry, Merchant::class);
}

}

+ 14
- 0
Repository/Merchant/MerchantRepositoryQuery.php Ver fichero

@@ -0,0 +1,14 @@
<?php

namespace Lc\CaracoleBundle\Repository\Merchant;

use Knp\Component\Pager\PaginatorInterface;
use Lc\SovBundle\Repository\AbstractRepositoryQuery;

class MerchantRepositoryQuery extends AbstractRepositoryQuery
{
public function __construct(MerchantRepository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, 'r', $paginator);
}
}

+ 13
- 0
Repository/Merchant/MerchantStore.php Ver fichero

@@ -0,0 +1,13 @@
<?php

namespace Lc\CaracoleBundle\Repository\Merchant;

class MerchantStore
{
protected MerchantRepositoryQuery $query;

public function __construct(MerchantRepositoryQuery $query)
{
$this->query = $query;
}
}

Repository/RepositoryMerchantTrait.php → Repository/MerchantRepositoryQueryTrait.php Ver fichero

@@ -4,7 +4,7 @@ namespace Lc\CaracoleBundle\Repository;

use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;

trait RepositoryMerchantTrait
trait MerchantRepositoryQueryTrait
{
public function filterByMerchant(MerchantInterface $merchant)
{

+ 11
- 0
Repository/Newsletter/NewsletterRepositoryQuery.php Ver fichero

@@ -0,0 +1,11 @@
<?php

namespace Lc\CaracoleBundle\Repository\Newsletter;

use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
use Lc\SovBundle\Repository\Newsletter\NewsletterRepositoryQuery as SovNewsletterRepositoryQuery;

class NewsletterRepositoryQuery extends SovNewsletterRepositoryQuery
{
use MerchantRepositoryQueryTrait;
}

+ 4
- 10
Repository/Order/OrderPaymentRepository.php Ver fichero

@@ -2,20 +2,14 @@

namespace Lc\CaracoleBundle\Repository\Order;

use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use App\Entity\Order\OrderPayment;
use Doctrine\Persistence\ManagerRegistry;
use Lc\CaracoleBundle\Model\Order\OrderPaymentInterface;
use Lc\SovBundle\Repository\AbstractRepository;

/**
* @method OrderPaymentInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method OrderPaymentInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method OrderPaymentInterface[] findAll()
* @method OrderPaymentInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class OrderPaymentRepository extends ServiceEntityRepository
class OrderPaymentRepository extends AbstractRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, OrderPaymentInterface::class);
parent::__construct($registry, OrderPayment::class);
}
}

+ 14
- 0
Repository/Order/OrderPaymentRepositoryQuery.php Ver fichero

@@ -0,0 +1,14 @@
<?php

namespace Lc\CaracoleBundle\Repository\Order;

use Knp\Component\Pager\PaginatorInterface;
use Lc\SovBundle\Repository\AbstractRepositoryQuery;

class OrderPaymentRepositoryQuery extends AbstractRepositoryQuery
{
public function __construct(OrderPaymentRepository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, 'r', $paginator);
}
}

+ 13
- 0
Repository/Order/OrderPaymentStore.php Ver fichero

@@ -0,0 +1,13 @@
<?php

namespace Lc\CaracoleBundle\Repository\Order;

class OrderPaymentStore
{
protected OrderPaymentRepositoryQuery $query;

public function __construct(OrderPaymentRepositoryQuery $query)
{
$this->query = $query;
}
}

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio

Cargando…
Cancelar
Guardar