use Doctrine\ORM\QueryBuilder; | use Doctrine\ORM\QueryBuilder; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection; | use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Collection\FilterCollection; | use EasyCorp\Bundle\EasyAdminBundle\Collection\FilterCollection; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Config\KeyValueStore; | |||||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | ||||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMultipleMerchantsInterface; | use Lc\CaracoleBundle\Doctrine\Extension\FilterMultipleMerchantsInterface; | ||||
use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface; | use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface; | ||||
'user_merchant_factory' => UserMerchantFactory::class, | '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( | public function createIndexQueryBuilder( | ||||
SearchDto $searchDto, | SearchDto $searchDto, | ||||
EntityDto $entityDto, | EntityDto $entityDto, |
public function configureCrud(Crud $crud): Crud | 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; | return $crud; | ||||
} | } |
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
use Symfony\Component\HttpFoundation\Request; | use Symfony\Component\HttpFoundation\Request; | ||||
use Symfony\Component\Security\Core\Security; | use Symfony\Component\Security\Core\Security; | ||||
use Symfony\Component\Routing\Annotation\Route; | |||||
class FavoriteMerchantController extends AbstractController | class FavoriteMerchantController extends AbstractController | ||||
{ | { | ||||
/** | |||||
* @Route("/merchant/favorite", name="carac_merchant_favorite") | |||||
*/ | |||||
public function favoriteMerchant(Request $request, Security $security, EntityManagerInterface $em) | public function favoriteMerchant(Request $request, Security $security, EntityManagerInterface $em) | ||||
{ | { | ||||
$user = $security->getUser() ; | $user = $security->getUser() ; |
use Lc\CaracoleBundle\Repository\Merchant\MerchantRepository; | use Lc\CaracoleBundle\Repository\Merchant\MerchantRepository; | ||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
use Symfony\Component\HttpFoundation\Request; | use Symfony\Component\HttpFoundation\Request; | ||||
use Symfony\Component\Routing\Annotation\Route; | |||||
class SwitchMerchantController extends AbstractController | class SwitchMerchantController extends AbstractController | ||||
{ | { | ||||
/** | |||||
* @Route("/merchant/switch", name="carac_merchant_switch") | |||||
*/ | |||||
public function switchMerchant(Request $request, MerchantRepository $merchantRepository) | public function switchMerchant(Request $request, MerchantRepository $merchantRepository) | ||||
{ | { | ||||
$form = $this->createForm(SwitchMerchantFormType::class); | $form = $this->createForm(SwitchMerchantFormType::class); |
use Lc\CaracoleBundle\Resolver\MerchantResolver; | use Lc\CaracoleBundle\Resolver\MerchantResolver; | ||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
use Symfony\Component\HttpFoundation\Request; | use Symfony\Component\HttpFoundation\Request; | ||||
use Symfony\Component\Routing\Annotation\Route; | |||||
class SwitchSectionAdminController extends AbstractController | class SwitchSectionAdminController extends AbstractController | ||||
{ | { | ||||
/** | |||||
* @Route("/section/switch", name="carac_section_switch") | |||||
*/ | |||||
public function switchSection( | public function switchSection( | ||||
Request $request, | Request $request, | ||||
EntityManagerInterface $em, | EntityManagerInterface $em, |
use Lc\SovBundle\Repository\Site\SiteRepository; | use Lc\SovBundle\Repository\Site\SiteRepository; | ||||
use Lc\SovBundle\Translation\TranslatorAdmin; | use Lc\SovBundle\Translation\TranslatorAdmin; | ||||
use Symfony\Component\HttpFoundation\Request; | use Symfony\Component\HttpFoundation\Request; | ||||
use Symfony\Component\Routing\Annotation\Route; | |||||
class SettingAdminController extends SovSettingController | class SettingAdminController extends SovSettingController | ||||
{ | { | ||||
$this->siteRepository = $siteRepository; | $this->siteRepository = $siteRepository; | ||||
} | } | ||||
/** | |||||
* @Route("/admin/setting/merchant", name="carac_admin_setting_merchant") | |||||
*/ | |||||
public function manageMerchant(Request $request) | public function manageMerchant(Request $request) | ||||
{ | { | ||||
return $this->manage($request, 'merchant'); | return $this->manage($request, 'merchant'); | ||||
} | } | ||||
/** | |||||
* @Route("/admin/setting/section", name="carac_admin_setting_section") | |||||
*/ | |||||
public function manageSection(Request $request) | public function manageSection(Request $request) | ||||
{ | { | ||||
return $this->manage($request, 'section'); | return $this->manage($request, 'section'); | ||||
} | } | ||||
return $this->render( | 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) | public function manageGlobal(Request $request) | ||||
{ | { | ||||
$site = $this->siteRepository->findOneByDevAlias('default') ; | |||||
$site = $this->siteRepository->findOneByDevAlias('default'); | |||||
$form = $this->createForm(SiteSettingsFormType::class, $site); | $form = $this->createForm(SiteSettingsFormType::class, $site); | ||||
$form->handleRequest($request); | $form->handleRequest($request); | ||||
if ($form->isSubmitted() && $form->isValid()) { | if ($form->isSubmitted() && $form->isValid()) { | ||||
$this->em->update($site); | $this->em->update($site); | ||||
$this->em->flush(); | $this->em->flush(); | ||||
} | } | ||||
return $this->render( | return $this->render( | ||||
'@LcCaracole/admin/setting/global.html.twig' , | |||||
'@LcCaracole/admin/setting/edit_site.html.twig', | |||||
[ | [ | ||||
'setting_definition' => $this->siteSettingDefinition, | 'setting_definition' => $this->siteSettingDefinition, | ||||
'form' => $form->createView() | 'form' => $form->createView() |
namespace Lc\CaracoleBundle\Controller\Ticket; | namespace Lc\CaracoleBundle\Controller\Ticket; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Config\KeyValueStore; | |||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | use Lc\CaracoleBundle\Controller\AdminControllerTrait; | ||||
use Lc\SovBundle\Controller\Ticket\TicketAdminController as SovTicketAdminController; | use Lc\SovBundle\Controller\Ticket\TicketAdminController as SovTicketAdminController; | ||||
} | } | ||||
return $this->render( | return $this->render( | ||||
'@LcCaracole/admin/user/usermerchant_new.html.twig', | |||||
'@LcCaracole/admin/user/new_usermerchant.html.twig', | |||||
[ | [ | ||||
'form' => $form->createView(), | 'form' => $form->createView(), | ||||
] | ] |
use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface; | use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface; | ||||
use Lc\CaracoleBundle\Factory\Setting\MerchantSettingFactory; | use Lc\CaracoleBundle\Factory\Setting\MerchantSettingFactory; | ||||
use Lc\CaracoleBundle\Factory\Setting\SectionSettingFactory; | use Lc\CaracoleBundle\Factory\Setting\SectionSettingFactory; | ||||
use Lc\CaracoleBundle\Factory\User\UserMerchantFactory; | |||||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | use Lc\CaracoleBundle\Model\Section\SectionInterface; | ||||
use Lc\CaracoleBundle\Repository\Merchant\MerchantRepository; | |||||
use Lc\CaracoleBundle\Definition\SectionSettingDefinitionInterface; | use Lc\CaracoleBundle\Definition\SectionSettingDefinitionInterface; | ||||
use Lc\CaracoleBundle\Repository\Merchant\MerchantRepository; | |||||
use Lc\CaracoleBundle\Repository\Section\SectionRepository; | use Lc\CaracoleBundle\Repository\Section\SectionRepository; | ||||
use Lc\CaracoleBundle\Resolver\MerchantResolver; | |||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | use Symfony\Component\EventDispatcher\EventSubscriberInterface; | ||||
use Symfony\Component\HttpKernel\KernelEvents; | use Symfony\Component\HttpKernel\KernelEvents; | ||||
use Symfony\Component\Security\Core\Security; | |||||
class SettingEventSubscriber implements EventSubscriberInterface | class SettingEventSubscriber implements EventSubscriberInterface | ||||
{ | { |
return; | return; | ||||
} | } | ||||
if ($this->setUserRoles($event->getRequest())) { | 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); | $event->setResponse($response); | ||||
} | } | ||||
} | } |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Address; | |||||
interface AddressFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Config; | |||||
interface TaxRateFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Config; | |||||
interface UnitFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Credit; | |||||
interface CreditHistoryFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\File; | |||||
interface DocumentFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Merchant; | |||||
interface MerchantFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderPaymentFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderProductFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderProductReductionCatalogFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderProductRefundFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderReductionCartFactoryInterface{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderReductionCreditFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderRefundFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderShopFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderStatusFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Order; | |||||
interface OrderStatusHistoryFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\PointSale; | |||||
interface PointSaleFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Product; | |||||
interface ProductCategoryFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Product; | |||||
interface ProductFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Product; | |||||
interface ProductFamilyFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||||
interface ReductionCartFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||||
interface ReductionCatalogFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Reduction; | |||||
interface ReductionCreditFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\Section; | |||||
interface SectionFactoryInterface | |||||
{ | |||||
} |
use App\Entity\Setting\SectionSetting; | use App\Entity\Setting\SectionSetting; | ||||
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | ||||
use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | |||||
use Lc\SovBundle\Factory\AbstractFactory; | use Lc\SovBundle\Factory\AbstractFactory; | ||||
class SectionSettingFactory extends AbstractFactory | class SectionSettingFactory extends AbstractFactory | ||||
{ | { | ||||
use MerchantFactoryTrait; | |||||
use SectionFactoryTrait; | |||||
public function create() | public function create() | ||||
{ | { | ||||
$sectionSetting = new SectionSetting(); | $sectionSetting = new SectionSetting(); | ||||
$sectionSetting->setMerchant($this->merchant); | |||||
$sectionSetting->setSection($this->section); | |||||
return $sectionSetting; | return $sectionSetting; | ||||
} | } |
<?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; | |||||
} | |||||
} |
<?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; | |||||
} | |||||
} |
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | use Lc\CaracoleBundle\Factory\MerchantFactoryTrait; | ||||
use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | use Lc\CaracoleBundle\Factory\SectionFactoryTrait; | ||||
use Lc\SovBundle\Factory\Ticket\TicketFactory as SovTicketFactory; | use Lc\SovBundle\Factory\Ticket\TicketFactory as SovTicketFactory; | ||||
use Lc\SovBundle\Model\Ticket\TicketInterface; | |||||
class TicketFactory extends SovTicketFactory | class TicketFactory extends SovTicketFactory | ||||
{ | { | ||||
use MerchantFactoryTrait; | use MerchantFactoryTrait; | ||||
public function create() | |||||
public function create(): TicketInterface | |||||
{ | { | ||||
$ticket = parent::create(); | $ticket = parent::create(); | ||||
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\User; | |||||
interface GroupUserFactoryInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
<?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; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Factory\User; | |||||
interface VisitorFactoryInterface | |||||
{ | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Model\Credit; | |||||
interface CreditConfigInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\CaracoleBundle\Model\Address\AddressInterface; | use Lc\CaracoleBundle\Model\Address\AddressInterface; | ||||
use Lc\CaracoleBundle\Model\Config\TaxRateInterface; | use Lc\CaracoleBundle\Model\Config\TaxRateInterface; | ||||
use Lc\CaracoleBundle\Model\Credit\CreditConfigInterface; | |||||
use Lc\SovBundle\Model\Newsletter\NewsletterInterface; | use Lc\SovBundle\Model\Newsletter\NewsletterInterface; | ||||
use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface; | use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface; | ||||
use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface; | use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface; | ||||
use EntitySettingTrait; | 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\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Config\TaxRateInterface") | ||||
* @ORM\JoinColumn(nullable=false) | * @ORM\JoinColumn(nullable=false) | ||||
return $this->getTitle() ; | 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 | public function getTaxRate(): ?TaxRateInterface | ||||
{ | { | ||||
return $this->taxRate; | return $this->taxRate; |
<?php | |||||
namespace Lc\CaracoleBundle\Model\PointSale; | |||||
interface PointSaleDayInfoInterface | |||||
{ | |||||
} |
<?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; | |||||
} | |||||
} |
*/ | */ | ||||
protected $code; | 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\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Address\AddressInterface", inversedBy="pointSale", cascade={"persist", "remove"}) | ||||
* @ORM\JoinColumn(nullable=false) | * @ORM\JoinColumn(nullable=false) | ||||
public function __construct() | public function __construct() | ||||
{ | { | ||||
$this->merchants = new ArrayCollection(); | $this->merchants = new ArrayCollection(); | ||||
$this->pointSaleDayInfos = new ArrayCollection(); | |||||
$this->userPointSales = new ArrayCollection(); | $this->userPointSales = new ArrayCollection(); | ||||
} | } | ||||
return $this; | 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 | public function getAddress(): ?AddressInterface | ||||
{ | { | ||||
return $this->address; | return $this->address; |
<?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); | |||||
} | |||||
} |
namespace Lc\CaracoleBundle\Repository\Address; | namespace Lc\CaracoleBundle\Repository\Address; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use App\Entity\Address\Address; | |||||
use Doctrine\Persistence\ManagerRegistry; | 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) | public function __construct(ManagerRegistry $registry) | ||||
{ | { | ||||
parent::__construct($registry, AddressInterface::class); | |||||
parent::__construct($registry, Address::class); | |||||
} | } | ||||
} | } |
<?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); | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Repository\Address; | |||||
class AddressStore | |||||
{ | |||||
protected AddressRepositoryQuery $query; | |||||
public function __construct(AddressRepositoryQuery $query) | |||||
{ | |||||
$this->query = $query; | |||||
} | |||||
} |
namespace Lc\CaracoleBundle\Repository\Config; | 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; | 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 | class TaxRateRepository extends AbstractRepository | ||||
{ | { | ||||
use RepositoryTrait; | |||||
public function getInterfaceClass() | |||||
public function __construct(ManagerRegistry $registry) | |||||
{ | { | ||||
return TaxRateInterface::class; | |||||
parent::__construct($registry, TaxRate::class); | |||||
} | } | ||||
} | } |
<?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); | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Repository\Config; | |||||
class TaxRateStore | |||||
{ | |||||
protected TaxRateRepositoryQuery $query; | |||||
public function __construct(TaxRateRepositoryQuery $query) | |||||
{ | |||||
$this->query = $query; | |||||
} | |||||
} |
namespace Lc\CaracoleBundle\Repository\Config; | 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; | 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 | class UnitRepository extends AbstractRepository | ||||
{ | { | ||||
use RepositoryTrait; | |||||
public function getInterfaceClass() | |||||
public function __construct(ManagerRegistry $registry) | |||||
{ | { | ||||
return UnitInterface::class; | |||||
parent::__construct($registry, Unit::class); | |||||
} | } | ||||
} | } |
<?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); | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Repository\Config; | |||||
class UnitStore | |||||
{ | |||||
protected UnitRepositoryQuery $query; | |||||
public function __construct(UnitRepositoryQuery $query) | |||||
{ | |||||
$this->query = $query; | |||||
} | |||||
} |
<?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); | |||||
} | |||||
} |
namespace Lc\CaracoleBundle\Repository\Credit; | 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; | 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 | class CreditHistoryRepository extends AbstractRepository | ||||
{ | { | ||||
use RepositoryTrait; | |||||
public function getInterfaceClass() | |||||
public function __construct(ManagerRegistry $registry) | |||||
{ | { | ||||
return CreditHistoryInterface::class; | |||||
parent::__construct($registry, CreditHistory::class); | |||||
} | } | ||||
} | } |
<?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); | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Repository\Credit; | |||||
class CreditHistoryStore | |||||
{ | |||||
protected CreditHistoryRepositoryQuery $query; | |||||
public function __construct(CreditHistoryRepositoryQuery $query) | |||||
{ | |||||
$this->query = $query; | |||||
} | |||||
} |
namespace Lc\CaracoleBundle\Repository\File; | namespace Lc\CaracoleBundle\Repository\File; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use App\Entity\File\Document; | |||||
use Doctrine\Persistence\ManagerRegistry; | 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) | public function __construct(ManagerRegistry $registry) | ||||
{ | { | ||||
parent::__construct($registry, DocumentInterface::class); | |||||
parent::__construct($registry, Document::class); | |||||
} | } | ||||
} | } |
<?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); | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Repository\File; | |||||
class DocumentStore | |||||
{ | |||||
protected DocumentRepositoryQuery $query; | |||||
public function __construct(DocumentRepositoryQuery $query) | |||||
{ | |||||
$this->query = $query; | |||||
} | |||||
} |
<?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); | |||||
} | |||||
} |
namespace Lc\CaracoleBundle\Repository\Merchant; | 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; | 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 | class MerchantRepository extends AbstractRepository | ||||
{ | { | ||||
public function getInterfaceClass() | |||||
public function __construct(ManagerRegistry $registry) | |||||
{ | { | ||||
return MerchantInterface::class; | |||||
parent::__construct($registry, Merchant::class); | |||||
} | } | ||||
} | } |
<?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); | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Repository\Merchant; | |||||
class MerchantStore | |||||
{ | |||||
protected MerchantRepositoryQuery $query; | |||||
public function __construct(MerchantRepositoryQuery $query) | |||||
{ | |||||
$this->query = $query; | |||||
} | |||||
} |
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | ||||
trait RepositoryMerchantTrait | |||||
trait MerchantRepositoryQueryTrait | |||||
{ | { | ||||
public function filterByMerchant(MerchantInterface $merchant) | public function filterByMerchant(MerchantInterface $merchant) | ||||
{ | { |
<?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; | |||||
} |
namespace Lc\CaracoleBundle\Repository\Order; | namespace Lc\CaracoleBundle\Repository\Order; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use App\Entity\Order\OrderPayment; | |||||
use Doctrine\Persistence\ManagerRegistry; | 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) | public function __construct(ManagerRegistry $registry) | ||||
{ | { | ||||
parent::__construct($registry, OrderPaymentInterface::class); | |||||
parent::__construct($registry, OrderPayment::class); | |||||
} | } | ||||
} | } |
<?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); | |||||
} | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Repository\Order; | |||||
class OrderPaymentStore | |||||
{ | |||||
protected OrderPaymentRepositoryQuery $query; | |||||
public function __construct(OrderPaymentRepositoryQuery $query) | |||||
{ | |||||
$this->query = $query; | |||||
} | |||||
} |