@@ -47,6 +47,8 @@ class AddressContainer | |||
public function getStore(): AddressStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -34,6 +34,8 @@ class TaxRateContainer | |||
public function getStore(): TaxRateStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
} |
@@ -51,6 +51,8 @@ class CreditHistoryContainer | |||
public function getStore(): CreditHistoryStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -34,6 +34,8 @@ class DocumentContainer | |||
public function getStore(): DocumentStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
} |
@@ -59,6 +59,8 @@ class OrderShopContainer | |||
public function getStore(): OrderShopStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -52,6 +52,8 @@ class PointSaleContainer | |||
public function getStore(): PointSaleStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
} |
@@ -43,6 +43,8 @@ class ProductCategoryContainer | |||
public function getStore(): ProductCategoryStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -43,6 +43,8 @@ class ProductContainer | |||
public function getStore(): ProductStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -55,6 +55,8 @@ class ProductFamilyContainer | |||
public function getStore(): ProductFamilyStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -54,6 +54,8 @@ class ProductFamilySectionPropertyContainer | |||
public function getStore(): ProductFamilySectionPropertyStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -34,6 +34,8 @@ class ReductionCartContainer | |||
public function getStore(): ReductionCartStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -34,6 +34,8 @@ class ReductionCatalogContainer | |||
public function getStore(): ReductionCatalogStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -43,6 +43,8 @@ class OpeningContainer | |||
public function getStore(): OpeningStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -52,6 +52,8 @@ class SectionContainer | |||
public function getStore(): SectionStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
} |
@@ -47,6 +47,8 @@ class MerchantSettingContainer | |||
public function getStore(): MerchantSettingStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -47,6 +47,8 @@ class SectionSettingContainer | |||
public function getStore(): SectionSettingStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -51,6 +51,8 @@ class UserMerchantContainer | |||
public function getStore(): UserMerchantStore | |||
{ | |||
$this->store->resetContext(); | |||
return $this->store; | |||
} | |||
@@ -0,0 +1,10 @@ | |||
<?php | |||
namespace Lc\CaracoleBundle\Repository; | |||
Use Lc\SovBundle\Repository\AbstractStore as SovAbstractStore; | |||
abstract class AbstractStore extends SovAbstractStore | |||
{ | |||
use StoreTrait; | |||
} |
@@ -2,9 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Address; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class AddressStore extends AbstractStore |
@@ -2,10 +2,8 @@ | |||
namespace Lc\CaracoleBundle\Repository\Config; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\CaracoleBundle\Resolver\MerchantResolver; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class TaxRateStore extends AbstractStore |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Config; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class UnitStore extends AbstractStore |
@@ -4,7 +4,7 @@ namespace Lc\CaracoleBundle\Repository\Credit; | |||
use App\Entity\User\UserMerchant; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use DateTime; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
@@ -3,9 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Distribution; | |||
use App\Entity\Distribution\Distribution; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore;; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class DistributionStore extends AbstractStore |
@@ -6,7 +6,7 @@ use App\Entity\Address\Address; | |||
use Lc\CaracoleBundle\Model\File\DocumentInterface; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class DocumentStore extends AbstractStore |
@@ -2,8 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Merchant; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class MerchantStore extends AbstractStore |
@@ -8,9 +8,9 @@ use Lc\SovBundle\Repository\StoreInterface; | |||
trait MerchantStoreTrait | |||
{ | |||
protected MerchantInterface $merchant; | |||
protected ?MerchantInterface $merchant = null; | |||
public function setMerchant(MerchantInterface $merchant):self | |||
public function setMerchant(?MerchantInterface $merchant):self | |||
{ | |||
$this->merchant = $merchant; | |||
@@ -4,11 +4,13 @@ namespace Lc\CaracoleBundle\Repository\Newsletter; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\CaracoleBundle\Repository\StoreTrait; | |||
use Lc\SovBundle\Repository\Newsletter\NewsletterStore as SovNewsletterStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class NewsletterStore extends SovNewsletterStore | |||
{ | |||
use StoreTrait; | |||
use SectionStoreTrait; | |||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class OrderPaymentStore extends AbstractStore |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class OrderProductReductionCatalogStore extends AbstractStore |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class OrderProductRefundStore extends AbstractStore |
@@ -6,7 +6,7 @@ use Lc\CaracoleBundle\Model\Order\OrderShopInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderStatusModel; | |||
use Lc\CaracoleBundle\Model\Product\ProductInterface; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class OrderProductStore extends AbstractStore |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class OrderReductionCartStore extends AbstractStore |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class OrderReductionCreditStore extends AbstractStore |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class OrderRefundStore extends AbstractStore |
@@ -25,7 +25,7 @@ use Lc\CaracoleBundle\Solver\Order\OrderShopSolver; | |||
use Lc\CaracoleBundle\Solver\Price\PriceSolver; | |||
use Lc\CaracoleBundle\Solver\Reduction\ReductionCartSolver; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; | |||
use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class OrderStatusHistoryStore extends AbstractStore |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class OrderStatusStore extends AbstractStore |
@@ -3,7 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\PointSale; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class PointSaleStore extends AbstractStore |
@@ -4,7 +4,7 @@ namespace Lc\CaracoleBundle\Repository\Product; | |||
use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class ProductCategoryStore extends AbstractStore |
@@ -4,7 +4,7 @@ namespace Lc\CaracoleBundle\Repository\Product; | |||
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class ProductFamilySectionPropertyStore extends AbstractStore |
@@ -9,7 +9,7 @@ use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\CaracoleBundle\Solver\Price\PriceSolver; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class ProductFamilyStore extends AbstractStore |
@@ -3,7 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Product; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class ProductStore extends AbstractStore |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Product; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class QualityLabelStore extends AbstractStore |
@@ -2,15 +2,11 @@ | |||
namespace Lc\CaracoleBundle\Repository\Reduction; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface; | |||
use Lc\CaracoleBundle\Repository\Order\OrderShopStore; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\CaracoleBundle\Solver\Price\PriceSolver; | |||
use Lc\CaracoleBundle\Solver\Reduction\ReductionCartSolver; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; | |||
class ReductionCartStore extends AbstractStore | |||
{ |
@@ -4,7 +4,7 @@ namespace Lc\CaracoleBundle\Repository\Reduction; | |||
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class ReductionCatalogStore extends AbstractStore |
@@ -2,14 +2,10 @@ | |||
namespace Lc\CaracoleBundle\Repository\Reduction; | |||
use Lc\CaracoleBundle\Model\Order\OrderShopInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCreditModel; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\CaracoleBundle\Repository\Order\OrderShopStore; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class ReductionCreditStore extends AbstractStore |
@@ -4,12 +4,13 @@ namespace Lc\CaracoleBundle\Repository\Reminder; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
use Lc\CaracoleBundle\Repository\StoreTrait; | |||
use Lc\SovBundle\Repository\Reminder\ReminderStore as SovReminderStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class ReminderStore extends SovReminderStore | |||
{ | |||
use StoreTrait; | |||
use SectionStoreTrait; | |||
use MerchantStoreTrait; | |||
@@ -3,8 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Section; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\CaracoleBundle\Solver\Section\OpeningSolver; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class OpeningStore extends AbstractStore |
@@ -2,11 +2,10 @@ | |||
namespace Lc\CaracoleBundle\Repository\Section; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\CaracoleBundle\Repository\Order\OrderShopStore; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |||
@@ -10,7 +10,7 @@ trait SectionStoreTrait | |||
{ | |||
protected ?SectionInterface $section = null; | |||
public function setSection(SectionInterface $section):self | |||
public function setSection(?SectionInterface $section):self | |||
{ | |||
$this->section = $section; | |||
@@ -3,7 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Setting; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class MerchantSettingStore extends AbstractStore |
@@ -3,7 +3,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\Setting; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class SectionSettingStore extends AbstractStore |
@@ -3,16 +3,18 @@ | |||
namespace Lc\CaracoleBundle\Repository\Site; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\CaracoleBundle\Repository\StoreTrait; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
use Lc\SovBundle\Repository\Site\NewsStore as SovNewsStore; | |||
class NewsStore extends SovNewsStore | |||
{ | |||
use StoreTrait; | |||
use SectionStoreTrait; | |||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | |||
{ | |||
$query->filterBySection($this->section); | |||
$this->addFilterBySectionOptionnal($query); | |||
return parent::filtersDefault($query); | |||
} | |||
@@ -2,15 +2,15 @@ | |||
namespace Lc\CaracoleBundle\Repository\Site; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Model\Site\PageInterface; | |||
use Lc\CaracoleBundle\Repository\StoreTrait; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
use Lc\SovBundle\Repository\Site\PageStore as SovPageStore; | |||
class PageStore extends SovPageStore | |||
{ | |||
use StoreTrait; | |||
use MerchantStoreTrait; | |||
use SectionStoreTrait; | |||
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace Lc\CaracoleBundle\Repository; | |||
trait StoreTrait | |||
{ | |||
public function resetContext(): void | |||
{ | |||
if(method_exists($this, 'setMerchant')) { | |||
$this->setMerchant(null); | |||
} | |||
if(method_exists($this, 'setSection')) { | |||
$this->setSection(null); | |||
} | |||
} | |||
} |
@@ -3,12 +3,13 @@ | |||
namespace Lc\CaracoleBundle\Repository\Ticket; | |||
use Lc\CaracoleBundle\Repository\SectionStoreTrait; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
use Lc\CaracoleBundle\Repository\StoreTrait; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
use Lc\SovBundle\Repository\Ticket\TicketStore as SovTicketStore; | |||
class TicketStore extends SovTicketStore | |||
{ | |||
use StoreTrait; | |||
use SectionStoreTrait; | |||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface |
@@ -3,11 +3,13 @@ | |||
namespace Lc\CaracoleBundle\Repository\User; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\CaracoleBundle\Repository\StoreTrait; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
use Lc\SovBundle\Repository\User\GroupUserStore as SovGroupUserStore; | |||
class GroupUserStore extends SovGroupUserStore | |||
{ | |||
use StoreTrait; | |||
use MerchantStoreTrait; | |||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface |
@@ -2,12 +2,11 @@ | |||
namespace Lc\CaracoleBundle\Repository\User; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\User\UserMerchantInterface; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\CaracoleBundle\Solver\User\UserMerchantSolver; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class UserMerchantStore extends AbstractStore |
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\User; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class UserPointSaleStore extends AbstractStore |
@@ -2,18 +2,20 @@ | |||
namespace Lc\CaracoleBundle\Repository\User; | |||
use App\Entity\Newsletter\Newsletter; | |||
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; | |||
use Lc\CaracoleBundle\Repository\StoreTrait; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
use Lc\SovBundle\Repository\User\UserStore as SovUserStore; | |||
class UserStore extends SovUserStore | |||
{ | |||
use StoreTrait; | |||
use MerchantStoreTrait; | |||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | |||
{ | |||
$query->filterByMerchant($this->merchant); | |||
$this->addFilterByMerchantOptionnal($this->merchant); | |||
return $query; | |||
} | |||
@@ -2,7 +2,7 @@ | |||
namespace Lc\CaracoleBundle\Repository\User; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\CaracoleBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class VisitorStore extends AbstractStore |