Przeglądaj źródła

Refactoring repositories #1084

feature/souke
Guillaume Bourgeois 1 rok temu
rodzic
commit
da0fd859c1
100 zmienionych plików z 565 dodań i 214 usunięć
  1. +4
    -1
      common/logic/AbstractContainer.php
  2. +12
    -9
      common/logic/AbstractRepository.php
  3. +12
    -1
      common/logic/AbstractRepositoryQuery.php
  4. +9
    -10
      common/logic/Config/TaxRate/Repository/TaxRateRepository.php
  5. +5
    -4
      common/logic/Config/TaxRate/Repository/TaxRateRepositoryQuery.php
  6. +14
    -0
      common/logic/Config/TaxRate/Service/TaxRateDefinition.php
  7. +7
    -6
      common/logic/Config/TaxRate/Wrapper/TaxRateContainer.php
  8. +2
    -0
      common/logic/Config/TaxRate/Wrapper/TaxRateManager.php
  9. +1
    -1
      common/logic/ContainerInterface.php
  10. +1
    -1
      common/logic/DefinitionInterface.php
  11. +3
    -2
      common/logic/Distribution/Distribution/Repository/DistributionRepository.php
  12. +3
    -9
      common/logic/Distribution/Distribution/Repository/DistributionRepositoryQuery.php
  13. +0
    -6
      common/logic/Distribution/Distribution/Wrapper/DistributionContainer.php
  14. +2
    -0
      common/logic/Distribution/Distribution/Wrapper/DistributionManager.php
  15. +2
    -2
      common/logic/Distribution/PointSaleDistribution/Repository/PointSaleDistributionRepository.php
  16. +3
    -7
      common/logic/Distribution/PointSaleDistribution/Repository/PointSaleDistributionRepositoryQuery.php
  17. +0
    -5
      common/logic/Distribution/PointSaleDistribution/Wrapper/PointSaleDistributionContainer.php
  18. +2
    -0
      common/logic/Distribution/PointSaleDistribution/Wrapper/PointSaleDistributionManager.php
  19. +1
    -1
      common/logic/Distribution/ProductDistribution/Repository/ProductDistributionRepository.php
  20. +5
    -2
      common/logic/Distribution/ProductDistribution/Repository/ProductDistributionRepositoryQuery.php
  21. +14
    -0
      common/logic/Distribution/ProductDistribution/Service/ProductDistributionDefinition.php
  22. +7
    -5
      common/logic/Distribution/ProductDistribution/Wrapper/ProductDistributionContainer.php
  23. +2
    -0
      common/logic/Distribution/ProductDistribution/Wrapper/ProductDistributionManager.php
  24. +1
    -1
      common/logic/Document/DeliveryNote/Repository/DeliveryNoteRepository.php
  25. +5
    -2
      common/logic/Document/DeliveryNote/Repository/DeliveryNoteRepositoryQuery.php
  26. +14
    -0
      common/logic/Document/DeliveryNote/Service/DeliveryNoteDefinition.php
  27. +7
    -6
      common/logic/Document/DeliveryNote/Wrapper/DeliveryNoteContainer.php
  28. +2
    -0
      common/logic/Document/DeliveryNote/Wrapper/DeliveryNoteManager.php
  29. +14
    -0
      common/logic/Document/Document/Service/DocumentDefinition.php
  30. +8
    -6
      common/logic/Document/Document/Wrapper/DocumentContainer.php
  31. +2
    -0
      common/logic/Document/Document/Wrapper/DocumentManager.php
  32. +1
    -1
      common/logic/Document/Invoice/Repository/InvoiceRepository.php
  33. +5
    -4
      common/logic/Document/Invoice/Repository/InvoiceRepositoryQuery.php
  34. +14
    -0
      common/logic/Document/Invoice/Service/InvoiceDefinition.php
  35. +7
    -6
      common/logic/Document/Invoice/Wrapper/InvoiceContainer.php
  36. +2
    -0
      common/logic/Document/Invoice/Wrapper/InvoiceManager.php
  37. +1
    -1
      common/logic/Document/Quotation/Repository/QuotationRepository.php
  38. +5
    -2
      common/logic/Document/Quotation/Repository/QuotationRepositoryQuery.php
  39. +14
    -0
      common/logic/Document/Quotation/Service/QuotationDefinition.php
  40. +7
    -6
      common/logic/Document/Quotation/Wrapper/QuotationContainer.php
  41. +2
    -0
      common/logic/Document/Quotation/Wrapper/QuotationManager.php
  42. +1
    -1
      common/logic/Order/Order/Repository/OrderRepository.php
  43. +5
    -4
      common/logic/Order/Order/Repository/OrderRepositoryQuery.php
  44. +14
    -0
      common/logic/Order/Order/Service/OrderDefinition.php
  45. +7
    -6
      common/logic/Order/Order/Wrapper/OrderContainer.php
  46. +2
    -0
      common/logic/Order/Order/Wrapper/OrderManager.php
  47. +1
    -1
      common/logic/Order/OrderStatusHistory/Repository/OrderStatusHistoryRepository.php
  48. +5
    -2
      common/logic/Order/OrderStatusHistory/Repository/OrderStatusHistoryRepositoryQuery.php
  49. +14
    -0
      common/logic/Order/OrderStatusHistory/Service/OrderStatusHistoryDefinition.php
  50. +7
    -6
      common/logic/Order/OrderStatusHistory/Wrapper/OrderStatusHistoryContainer.php
  51. +2
    -0
      common/logic/Order/OrderStatusHistory/Wrapper/OrderStatusHistoryManager.php
  52. +1
    -1
      common/logic/Order/ProductOrder/Repository/ProductOrderRepository.php
  53. +5
    -2
      common/logic/Order/ProductOrder/Repository/ProductOrderRepositoryQuery.php
  54. +14
    -0
      common/logic/Order/ProductOrder/Service/ProductOrderDefinition.php
  55. +7
    -6
      common/logic/Order/ProductOrder/Wrapper/ProductOrderContainer.php
  56. +2
    -0
      common/logic/Order/ProductOrder/Wrapper/ProductOrderManager.php
  57. +1
    -1
      common/logic/PointSale/PointSale/Repository/PointSaleRepository.php
  58. +5
    -2
      common/logic/PointSale/PointSale/Repository/PointSaleRepositoryQuery.php
  59. +14
    -0
      common/logic/PointSale/PointSale/Service/PointSaleDefinition.php
  60. +7
    -6
      common/logic/PointSale/PointSale/Wrapper/PointSaleContainer.php
  61. +2
    -0
      common/logic/PointSale/PointSale/Wrapper/PointSaleManager.php
  62. +1
    -1
      common/logic/PointSale/UserPointSale/Repository/UserPointSaleRepository.php
  63. +5
    -2
      common/logic/PointSale/UserPointSale/Repository/UserPointSaleRepositoryQuery.php
  64. +14
    -0
      common/logic/PointSale/UserPointSale/Service/UserPointSaleDefinition.php
  65. +7
    -6
      common/logic/PointSale/UserPointSale/Wrapper/UserPointSaleContainer.php
  66. +2
    -0
      common/logic/PointSale/UserPointSale/Wrapper/UserPointSaleManager.php
  67. +1
    -1
      common/logic/Producer/Producer/Repository/ProducerRepository.php
  68. +5
    -2
      common/logic/Producer/Producer/Repository/ProducerRepositoryQuery.php
  69. +14
    -0
      common/logic/Producer/Producer/Service/ProducerDefinition.php
  70. +7
    -6
      common/logic/Producer/Producer/Wrapper/ProducerContainer.php
  71. +2
    -0
      common/logic/Producer/Producer/Wrapper/ProducerManager.php
  72. +1
    -1
      common/logic/Producer/ProducerPriceRange/Repository/ProducerPriceRangeRepository.php
  73. +5
    -2
      common/logic/Producer/ProducerPriceRange/Repository/ProducerPriceRangeRepositoryQuery.php
  74. +13
    -0
      common/logic/Producer/ProducerPriceRange/Service/ProducerPriceRangeDefinition.php
  75. +7
    -6
      common/logic/Producer/ProducerPriceRange/Wrapper/ProducerPriceRangeContainer.php
  76. +2
    -0
      common/logic/Producer/ProducerPriceRange/Wrapper/ProducerPriceRangeManager.php
  77. +1
    -1
      common/logic/Product/Product/Repository/ProductRepository.php
  78. +5
    -4
      common/logic/Product/Product/Repository/ProductRepositoryQuery.php
  79. +14
    -0
      common/logic/Product/Product/Service/ProductDefinition.php
  80. +8
    -6
      common/logic/Product/Product/Wrapper/ProductContainer.php
  81. +2
    -0
      common/logic/Product/Product/Wrapper/ProductManager.php
  82. +1
    -1
      common/logic/Product/ProductCategory/Repository/ProductCategoryRepository.php
  83. +5
    -2
      common/logic/Product/ProductCategory/Repository/ProductCategoryRepositoryQuery.php
  84. +15
    -0
      common/logic/Product/ProductCategory/Service/ProductCategoryDefinition.php
  85. +8
    -6
      common/logic/Product/ProductCategory/Wrapper/ProductCategoryContainer.php
  86. +2
    -0
      common/logic/Product/ProductCategory/Wrapper/ProductCategoryManager.php
  87. +1
    -1
      common/logic/Product/ProductPointSale/Repository/ProductPointSaleRepository.php
  88. +5
    -2
      common/logic/Product/ProductPointSale/Repository/ProductPointSaleRepositoryQuery.php
  89. +14
    -0
      common/logic/Product/ProductPointSale/Service/ProductPointSaleDefinition.php
  90. +8
    -6
      common/logic/Product/ProductPointSale/Wrapper/ProductPointSaleContainer.php
  91. +2
    -0
      common/logic/Product/ProductPointSale/Wrapper/ProductPointSaleManager.php
  92. +1
    -1
      common/logic/Product/ProductPrice/Repository/ProductPriceRepository.php
  93. +5
    -2
      common/logic/Product/ProductPrice/Repository/ProductPriceRepositoryQuery.php
  94. +14
    -0
      common/logic/Product/ProductPrice/Service/ProductPriceDefinition.php
  95. +7
    -6
      common/logic/Product/ProductPrice/Wrapper/ProductPriceContainer.php
  96. +2
    -0
      common/logic/Product/ProductPrice/Wrapper/ProductPriceManager.php
  97. +1
    -1
      common/logic/RepositoryQueryInterface.php
  98. +1
    -1
      common/logic/Subscription/ProductSubscription/Repository/ProductSubscriptionRepository.php
  99. +5
    -2
      common/logic/Subscription/ProductSubscription/Repository/ProductSubscriptionRepositoryQuery.php
  100. +14
    -0
      common/logic/Subscription/ProductSubscription/Service/ProductSubscriptionDefinition.php

+ 4
- 1
common/logic/AbstractContainer.php Wyświetl plik

@@ -4,5 +4,8 @@ namespace common\logic;

abstract class AbstractContainer extends AbstractSingleton implements ContainerInterface
{

public function getEntityFqcn(): string
{
return $this->getDefinition()->getEntityFqcn();
}
}

+ 12
- 9
common/logic/AbstractRepository.php Wyświetl plik

@@ -9,14 +9,17 @@ abstract class AbstractRepository extends AbstractService implements RepositoryI
const ORDER_BY = 'orderby';
const ATTRIBUTE_ID_PRODUCER = 'attribute_id_producer';

public function createQuery()
public function loadQuery(string $serviceClass)
{
$this->repositoryQuery->createQuery();
$this->query = $this->loadService($serviceClass);
}

return $this->repositoryQuery;
public function createQuery()
{
return $this->query->createQuery();
}

public function createDefaultQuery()
public function createDefaultQuery(): RepositoryQueryInterface
{
$this->createQuery();

@@ -24,24 +27,24 @@ abstract class AbstractRepository extends AbstractService implements RepositoryI

// with
if (is_array($defaultOptions['with']) && count($defaultOptions['with'])) {
$this->repositoryQuery->with($defaultOptions['with']);
$this->query->with($defaultOptions['with']);
}

// join with
if (is_array($defaultOptions['join_with']) && count($defaultOptions['join_with'])) {
$this->repositoryQuery->joinWith($defaultOptions['join_with']);
$this->query->joinWith($defaultOptions['join_with']);
}

// id producer contexte
if(isset($defaultOptions['attribute_id_producer']) && $defaultOptions['attribute_id_producer']) {
$this->repositoryQuery->andWhere([$defaultOptions['attribute_id_producer'] => $this->getProducerContextId()]);
$this->query->andWhere([$defaultOptions['attribute_id_producer'] => $this->getProducerContextId()]);
}

// order by
if(isset($defaultOptions['orderby']) && $defaultOptions['orderby']) {
$this->repositoryQuery->orderBy($defaultOptions['orderby']);
$this->query->orderBy($defaultOptions['orderby']);
}

return $this->repositoryQuery;
return $this->query;
}
}

+ 12
- 1
common/logic/AbstractRepositoryQuery.php Wyświetl plik

@@ -3,12 +3,23 @@
namespace common\logic;

use common\components\ActiveRecordCommon;
use common\logic\Distribution\Distribution\Service\DistributionDefinition;
use yii\db\ActiveQuery;

abstract class AbstractRepositoryQuery extends AbstractService implements RepositoryQueryInterface
{
protected ActiveQuery $query;
protected DefinitionInterface $definition;

public function loadDefinition(string $serviceClass): void
{
$this->definition = $this->loadService($serviceClass);
}

public function baseQuery(): ActiveQuery
{
$class = $this->definition->getEntityFqcn();
return $class::find();
}

public function createQuery(): self
{

+ 9
- 10
common/logic/Config/TaxRate/Repository/TaxRateRepository.php Wyświetl plik

@@ -4,15 +4,14 @@ namespace common\logic\Config\TaxRate\Repository;

use common\logic\AbstractRepository;
use common\logic\Config\TaxRate\Model\TaxRate;
use yii\db\ActiveQuery;

class TaxRateRepository extends AbstractRepository
{
protected TaxRateRepositoryQuery $repositoryQuery;
protected TaxRateRepositoryQuery $query;

public function loadDependencies(): void
{
$this->repositoryQuery = $this->loadService(TaxRateRepositoryQuery::class);
$this->loadQuery(TaxRateRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array
@@ -22,20 +21,20 @@ class TaxRateRepository extends AbstractRepository
self::JOIN_WITH => [],
self::ORDER_BY => 'pourcent ASC',
self::ATTRIBUTE_ID_PRODUCER => ''
] ;
];
}

public function findOneTaxRateById(int $id): ?TaxRate
{
$query = $this->createQuery();
$query->filterById($id);
return $query->findOne();
return $this->createQuery()
->filterById($id)
->findOne();
}

public function findTaxRates(): array
{
$query = $this->createQuery();
return $query->find();
return $this->createQuery()
->find();
}

public function findTaxRatesAsArray(): array
@@ -43,7 +42,7 @@ class TaxRateRepository extends AbstractRepository
$taxRateArrayReturn = [];
$taxRateArray = $this->findTaxRates();

foreach($taxRateArray as $taxRate) {
foreach ($taxRateArray as $taxRate) {
$taxRateArrayReturn[$taxRate->id] = $taxRate;
}


+ 5
- 4
common/logic/Config/TaxRate/Repository/TaxRateRepositoryQuery.php Wyświetl plik

@@ -3,13 +3,14 @@
namespace common\logic\Config\TaxRate\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Config\TaxRate\Model\TaxRate;
use yii\db\ActiveQuery;
use common\logic\Config\TaxRate\Service\TaxRateDefinition;

class TaxRateRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected TaxRateDefinition $definition;

public function loadDependencies(): void
{
return TaxRate::find();
$this->loadDefinition(TaxRateDefinition::class);
}
}

+ 14
- 0
common/logic/Config/TaxRate/Service/TaxRateDefinition.php Wyświetl plik

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

namespace common\logic\Config\TaxRate\Service;

use common\logic\AbstractDefinition;
use common\logic\Config\TaxRate\Model\TaxRate;

class TaxRateDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return TaxRate::class;
}
}

+ 7
- 6
common/logic/Config/TaxRate/Wrapper/TaxRateContainer.php Wyświetl plik

@@ -3,25 +3,26 @@
namespace common\logic\Config\TaxRate\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Config\TaxRate\Model\TaxRate;
use common\logic\Config\TaxRate\Repository\TaxRateRepository;
use common\logic\Config\TaxRate\Service\TaxRateBuilder;
use common\logic\Config\TaxRate\Service\TaxRateDefinition;

class TaxRateContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return TaxRate::class;
}

public function getServices(): array
{
return [
TaxRateDefinition::class,
TaxRateBuilder::class,
TaxRateRepository::class,
];
}

public function getDefinition(): TaxRateDefinition
{
return TaxRateDefinition::getInstance();
}

public function getBuilder(): TaxRateBuilder
{
return TaxRateBuilder::getInstance();

+ 2
- 0
common/logic/Config/TaxRate/Wrapper/TaxRateManager.php Wyświetl plik

@@ -5,8 +5,10 @@ namespace common\logic\Config\TaxRate\Wrapper;
use common\logic\AbstractManager;
use common\logic\Config\TaxRate\Repository\TaxRateRepository;
use common\logic\Config\TaxRate\Service\TaxRateBuilder;
use common\logic\Config\TaxRate\Service\TaxRateDefinition;

/**
* @mixin TaxRateDefinition
* @mixin TaxRateRepository
* @mixin TaxRateBuilder
*/

+ 1
- 1
common/logic/ContainerInterface.php Wyświetl plik

@@ -4,6 +4,6 @@ namespace common\logic;

interface ContainerInterface
{
public function getEntityFqcn(): string;
public function getServices(): array;
public function getDefinition(): DefinitionInterface;
}

+ 1
- 1
common/logic/DefinitionInterface.php Wyświetl plik

@@ -4,5 +4,5 @@ namespace common\logic;

interface DefinitionInterface
{
public function getEntityFqcn(): string;
}

+ 3
- 2
common/logic/Distribution/Distribution/Repository/DistributionRepository.php Wyświetl plik

@@ -5,18 +5,19 @@ namespace common\logic\Distribution\Distribution\Repository;
use common\logic\AbstractRepository;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Service\DistributionSolver;
use common\logic\RepositoryQueryInterface;
use common\logic\Subscription\Subscription\Model\Subscription;
use common\logic\Subscription\Subscription\Service\SubscriptionSolver;

class DistributionRepository extends AbstractRepository
{
protected DistributionRepositoryQuery $repositoryQuery;
protected DistributionRepositoryQuery $query;
protected DistributionSolver $distributionSolver;
protected SubscriptionSolver $subscriptionSolver;

public function loadDependencies(): void
{
$this->repositoryQuery = $this->loadService(DistributionRepositoryQuery::class);
$this->loadQuery(DistributionRepositoryQuery::class);
$this->distributionSolver = $this->loadService(DistributionSolver::class);
$this->subscriptionSolver = $this->loadService(SubscriptionSolver::class);
}

+ 3
- 9
common/logic/Distribution/Distribution/Repository/DistributionRepositoryQuery.php Wyświetl plik

@@ -3,22 +3,16 @@
namespace common\logic\Distribution\Distribution\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Service\DistributionDefinition;
use common\logic\Subscription\Subscription\Model\Subscription;
use yii\db\ActiveQuery;

class DistributionRepositoryQuery extends AbstractRepositoryQuery
{
public function loadDependencies(): void
{
$this->definition = $this->loadService(DistributionDefinition::class);
}
protected DistributionDefinition $definition;

public function baseQuery(): ActiveQuery
public function loadDependencies(): void
{
$class = $this->definition->getEntityFqcn();
return $class::find();
$this->loadDefinition(DistributionDefinition::class);
}

public function filterByDate(string $date): self

+ 0
- 6
common/logic/Distribution/Distribution/Wrapper/DistributionContainer.php Wyświetl plik

@@ -3,7 +3,6 @@
namespace common\logic\Distribution\Distribution\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Distribution\Distribution\Service\DistributionBuilder;
use common\logic\Distribution\Distribution\Service\DistributionDefinition;
@@ -11,11 +10,6 @@ use common\logic\Distribution\Distribution\Service\DistributionSolver;

class DistributionContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return $this->getDefinition()->getEntityFqcn();
}

public function getServices(): array
{
return [

+ 2
- 0
common/logic/Distribution/Distribution/Wrapper/DistributionManager.php Wyświetl plik

@@ -5,9 +5,11 @@ namespace common\logic\Distribution\Distribution\Wrapper;
use common\logic\AbstractManager;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Distribution\Distribution\Service\DistributionBuilder;
use common\logic\Distribution\Distribution\Service\DistributionDefinition;
use common\logic\Distribution\Distribution\Service\DistributionSolver;

/**
* @mixin DistributionDefinition
* @mixin DistributionSolver
* @mixin DistributionRepository
* @mixin DistributionBuilder

+ 2
- 2
common/logic/Distribution/PointSaleDistribution/Repository/PointSaleDistributionRepository.php Wyświetl plik

@@ -9,11 +9,11 @@ use common\logic\PointSale\PointSale\Model\PointSale;

class PointSaleDistributionRepository extends AbstractRepository
{
protected PointSaleDistributionRepositoryQuery $repositoryQuery;
protected PointSaleDistributionRepositoryQuery $query;

public function loadDependencies(): void
{
$this->repositoryQuery = $this->loadService(PointSaleDistributionRepositoryQuery::class);
$this->loadQuery(PointSaleDistributionRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array

+ 3
- 7
common/logic/Distribution/PointSaleDistribution/Repository/PointSaleDistributionRepositoryQuery.php Wyświetl plik

@@ -10,15 +10,11 @@ use yii\db\ActiveQuery;

class PointSaleDistributionRepositoryQuery extends AbstractRepositoryQuery
{
public function loadDependencies(): void
{
$this->definition = $this->loadService(PointSaleDistributionDefinition::class);
}
protected PointSaleDistributionDefinition $definition;

public function baseQuery(): ActiveQuery
public function loadDependencies(): void
{
$class = $this->definition->getEntityFqcn();
return $class::find();
$this->loadDefinition(PointSaleDistributionDefinition::class);
}

public function filterByDistribution(Distribution $distribution): self

+ 0
- 5
common/logic/Distribution/PointSaleDistribution/Wrapper/PointSaleDistributionContainer.php Wyświetl plik

@@ -9,11 +9,6 @@ use common\logic\Distribution\PointSaleDistribution\Service\PointSaleDistributio

class PointSaleDistributionContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return $this->getDefinition()->getEntityFqcn();
}

public function getServices(): array
{
return [

+ 2
- 0
common/logic/Distribution/PointSaleDistribution/Wrapper/PointSaleDistributionManager.php Wyświetl plik

@@ -5,8 +5,10 @@ namespace common\logic\Distribution\PointSaleDistribution\Wrapper;
use common\logic\AbstractManager;
use common\logic\Distribution\PointSaleDistribution\Repository\PointSaleDistributionRepository;
use common\logic\Distribution\PointSaleDistribution\Service\PointSaleDistributionBuilder;
use common\logic\Distribution\PointSaleDistribution\Service\PointSaleDistributionDefinition;

/**
* @mixin PointSaleDistributionDefinition
* @mixin PointSaleDistributionRepository
* @mixin PointSaleDistributionBuilder
*/

+ 1
- 1
common/logic/Distribution/ProductDistribution/Repository/ProductDistributionRepository.php Wyświetl plik

@@ -13,7 +13,7 @@ class ProductDistributionRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(ProductDistributionRepositoryQuery::class);
$this->loadQuery(ProductDistributionRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array

+ 5
- 2
common/logic/Distribution/ProductDistribution/Repository/ProductDistributionRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\Distribution\ProductDistribution\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;
use common\logic\Distribution\ProductDistribution\Service\ProductDistributionDefinition;
use yii\db\ActiveQuery;

class ProductDistributionRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected ProductDistributionDefinition $definition;

public function loadDependencies(): void
{
return ProductDistribution::find();
$this->loadDefinition(ProductDistributionDefinition::class);
}
}

+ 14
- 0
common/logic/Distribution/ProductDistribution/Service/ProductDistributionDefinition.php Wyświetl plik

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

namespace common\logic\Distribution\ProductDistribution\Service;

use common\logic\AbstractDefinition;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;

class ProductDistributionDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return ProductDistribution::class;
}
}

+ 7
- 5
common/logic/Distribution/ProductDistribution/Wrapper/ProductDistributionContainer.php Wyświetl plik

@@ -6,22 +6,24 @@ use common\logic\AbstractContainer;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;
use common\logic\Distribution\ProductDistribution\Repository\ProductDistributionRepository;
use common\logic\Distribution\ProductDistribution\Service\ProductDistributionBuilder;
use common\logic\Distribution\ProductDistribution\Service\ProductDistributionDefinition;

class ProductDistributionContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return ProductDistribution::class;
}

public function getServices(): array
{
return [
ProductDistributionDefinition::class,
ProductDistributionRepository::class,
ProductDistributionBuilder::class,
];
}

public function getDefinition(): ProductDistributionDefinition
{
return ProductDistributionDefinition::getInstance();
}

public function getRepository(): ProductDistributionRepository
{
return ProductDistributionRepository::getInstance();

+ 2
- 0
common/logic/Distribution/ProductDistribution/Wrapper/ProductDistributionManager.php Wyświetl plik

@@ -5,8 +5,10 @@ namespace common\logic\Distribution\ProductDistribution\Wrapper;
use common\logic\AbstractManager;
use common\logic\Distribution\ProductDistribution\Repository\ProductDistributionRepository;
use common\logic\Distribution\ProductDistribution\Service\ProductDistributionBuilder;
use common\logic\Distribution\ProductDistribution\Service\ProductDistributionDefinition;

/**
* @mixin ProductDistributionDefinition
* @mixin ProductDistributionRepository
* @mixin ProductDistributionBuilder
*/

+ 1
- 1
common/logic/Document/DeliveryNote/Repository/DeliveryNoteRepository.php Wyświetl plik

@@ -11,7 +11,7 @@ class DeliveryNoteRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(DeliveryNoteRepositoryQuery::class);
$this->loadQuery(DeliveryNoteRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array

+ 5
- 2
common/logic/Document/DeliveryNote/Repository/DeliveryNoteRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\Document\DeliveryNote\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Document\DeliveryNote\Model\DeliveryNote;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteDefinition;
use yii\db\ActiveQuery;

class DeliveryNoteRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected DeliveryNoteDefinition $definition;

public function loadDependencies(): void
{
return DeliveryNote::find();
$this->loadDefinition(DeliveryNoteDefinition::class);
}
}

+ 14
- 0
common/logic/Document/DeliveryNote/Service/DeliveryNoteDefinition.php Wyświetl plik

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

namespace common\logic\Document\DeliveryNote\Service;

use common\logic\AbstractDefinition;
use common\logic\Document\DeliveryNote\Model\DeliveryNote;

class DeliveryNoteDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return DeliveryNote::class;
}
}

+ 7
- 6
common/logic/Document/DeliveryNote/Wrapper/DeliveryNoteContainer.php Wyświetl plik

@@ -3,27 +3,28 @@
namespace common\logic\Document\DeliveryNote\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Document\DeliveryNote\Model\DeliveryNote;
use common\logic\Document\DeliveryNote\Repository\DeliveryNoteRepository;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteBuilder;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteDefinition;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteSolver;

class DeliveryNoteContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return DeliveryNote::class;
}

public function getServices(): array
{
return [
DeliveryNoteDefinition::class,
DeliveryNoteSolver::class,
DeliveryNoteRepository::class,
DeliveryNoteBuilder::class,
];
}

public function getDefinition(): DeliveryNoteDefinition
{
return DeliveryNoteDefinition::getInstance();
}

public function getSolver(): DeliveryNoteSolver
{
return DeliveryNoteSolver::getInstance();

+ 2
- 0
common/logic/Document/DeliveryNote/Wrapper/DeliveryNoteManager.php Wyświetl plik

@@ -4,10 +4,12 @@ namespace common\logic\Document\DeliveryNote\Wrapper;

use common\logic\Document\DeliveryNote\Repository\DeliveryNoteRepository;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteBuilder;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteDefinition;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteSolver;
use common\logic\Document\Document\Wrapper\DocumentManager;

/**
* @mixin DeliveryNoteDefinition
* @mixin DeliveryNoteSolver
* @mixin DeliveryNoteRepository
* @mixin DeliveryNoteBuilder

+ 14
- 0
common/logic/Document/Document/Service/DocumentDefinition.php Wyświetl plik

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

namespace common\logic\Document\Document\Service;

use common\logic\AbstractDefinition;
use common\logic\Document\Document\Model\Document;

class DocumentDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return Document::class;
}
}

+ 8
- 6
common/logic/Document/Document/Wrapper/DocumentContainer.php Wyświetl plik

@@ -3,22 +3,19 @@
namespace common\logic\Document\Document\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Document\Document\Model\Document;
use common\logic\DefinitionInterface;
use common\logic\Document\Document\Repository\DocumentRepository;
use common\logic\Document\Document\Service\DocumentBuilder;
use common\logic\Document\Document\Service\DocumentDefinition;
use common\logic\Document\Document\Service\DocumentSolver;
use common\logic\Document\Document\Service\DocumentUtils;

class DocumentContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return Document::class;
}

public function getServices(): array
{
return [
DocumentDefinition::class,
DocumentSolver::class,
DocumentRepository::class,
DocumentBuilder::class,
@@ -26,6 +23,11 @@ class DocumentContainer extends AbstractContainer
];
}

public function getDefinition(): DefinitionInterface
{
return DocumentDefinition::getInstance();
}

public function getSolver(): DocumentSolver
{
return DocumentSolver::getInstance();

+ 2
- 0
common/logic/Document/Document/Wrapper/DocumentManager.php Wyświetl plik

@@ -4,10 +4,12 @@ namespace common\logic\Document\Document\Wrapper;

use common\logic\AbstractManager;
use common\logic\Document\Document\Service\DocumentBuilder;
use common\logic\Document\Document\Service\DocumentDefinition;
use common\logic\Document\Document\Service\DocumentSolver;
use common\logic\Document\Document\Service\DocumentUtils;

/**
* @mixin DocumentDefinition
* @mixin DocumentSolver
* @mixin DocumentBuilder
* @mixin DocumentUtils

+ 1
- 1
common/logic/Document/Invoice/Repository/InvoiceRepository.php Wyświetl plik

@@ -11,7 +11,7 @@ class InvoiceRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(InvoiceRepositoryQuery::class);
$this->loadQuery(InvoiceRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array

+ 5
- 4
common/logic/Document/Invoice/Repository/InvoiceRepositoryQuery.php Wyświetl plik

@@ -3,13 +3,14 @@
namespace common\logic\Document\Invoice\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Document\Invoice\Model\Invoice;
use yii\db\ActiveQuery;
use common\logic\Document\Invoice\Service\InvoiceDefinition;

class InvoiceRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected InvoiceDefinition $definition;

public function loadDependencies(): void
{
return Invoice::find();
$this->loadDefinition(InvoiceDefinition::class);
}
}

+ 14
- 0
common/logic/Document/Invoice/Service/InvoiceDefinition.php Wyświetl plik

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

namespace common\logic\Document\Invoice\Service;

use common\logic\AbstractDefinition;
use common\logic\Document\Invoice\Model\Invoice;

class InvoiceDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return Invoice::class;
}
}

+ 7
- 6
common/logic/Document/Invoice/Wrapper/InvoiceContainer.php Wyświetl plik

@@ -4,26 +4,27 @@ namespace common\logic\Document\Invoice\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Document\Document\Service\DocumentSolver;
use common\logic\Document\Invoice\Model\Invoice;
use common\logic\Document\Invoice\Repository\InvoiceRepository;
use common\logic\Document\Invoice\Service\InvoiceBuilder;
use common\logic\Document\Invoice\Service\InvoiceDefinition;

class InvoiceContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return Invoice::class;
}

public function getServices(): array
{
return [
InvoiceDefinition::class,
DocumentSolver::class,
InvoiceRepository::class,
InvoiceBuilder::class,
];
}

public function getDefinition(): InvoiceDefinition
{
return InvoiceDefinition::getInstance();
}

public function getSolver(): DocumentSolver
{
return DocumentSolver::getInstance();

+ 2
- 0
common/logic/Document/Invoice/Wrapper/InvoiceManager.php Wyświetl plik

@@ -5,8 +5,10 @@ namespace common\logic\Document\Invoice\Wrapper;
use common\logic\Document\Document\Wrapper\DocumentManager;
use common\logic\Document\Invoice\Repository\InvoiceRepository;
use common\logic\Document\Invoice\Service\InvoiceBuilder;
use common\logic\Document\Invoice\Service\InvoiceDefinition;

/**
* @mixin InvoiceDefinition
* @mixin InvoiceRepository
* @mixin InvoiceBuilder
*/

+ 1
- 1
common/logic/Document/Quotation/Repository/QuotationRepository.php Wyświetl plik

@@ -11,7 +11,7 @@ class QuotationRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(QuotationRepositoryQuery::class);
$this->loadQuery(QuotationRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array

+ 5
- 2
common/logic/Document/Quotation/Repository/QuotationRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\Document\Quotation\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Document\Quotation\Model\Quotation;
use common\logic\Document\Quotation\Service\QuotationDefinition;
use yii\db\ActiveQuery;

class QuotationRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected QuotationDefinition $definition;

public function loadDependencies(): void
{
return Quotation::find();
$this->loadDefinition(QuotationDefinition::class);
}
}

+ 14
- 0
common/logic/Document/Quotation/Service/QuotationDefinition.php Wyświetl plik

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

namespace common\logic\Document\Quotation\Service;

use common\logic\AbstractDefinition;
use common\logic\Document\Quotation\Model\Quotation;

class QuotationDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return Quotation::class;
}
}

+ 7
- 6
common/logic/Document/Quotation/Wrapper/QuotationContainer.php Wyświetl plik

@@ -4,26 +4,27 @@ namespace common\logic\Document\Quotation\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Document\Document\Service\DocumentSolver;
use common\logic\Document\Quotation\Model\Quotation;
use common\logic\Document\Quotation\Repository\QuotationRepository;
use common\logic\Document\Quotation\Service\QuotationBuilder;
use common\logic\Document\Quotation\Service\QuotationDefinition;

class QuotationContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return Quotation::class;
}

public function getServices(): array
{
return [
QuotationDefinition::class,
DocumentSolver::class,
QuotationRepository::class,
QuotationBuilder::class,
];
}

public function getDefinition(): QuotationDefinition
{
return QuotationDefinition::getInstance();
}

public function getSolver(): DocumentSolver
{
return DocumentSolver::getInstance();

+ 2
- 0
common/logic/Document/Quotation/Wrapper/QuotationManager.php Wyświetl plik

@@ -5,8 +5,10 @@ namespace common\logic\Document\Quotation\Wrapper;
use common\logic\Document\Document\Wrapper\DocumentManager;
use common\logic\Document\Quotation\Repository\QuotationRepository;
use common\logic\Document\Quotation\Service\QuotationBuilder;
use common\logic\Document\Quotation\Service\QuotationDefinition;

/**
* @mixin QuotationDefinition
* @mixin QuotationRepository
* @mixin QuotationBuilder
*/

+ 1
- 1
common/logic/Order/Order/Repository/OrderRepository.php Wyświetl plik

@@ -30,7 +30,7 @@ class OrderRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(OrderRepositoryQuery::class);
$this->loadQuery(OrderRepositoryQuery::class);
$this->productOrderRepository = $this->loadService(ProductOrderRepository::class);
$this->producerRepository = $this->loadService(ProducerRepository::class);
$this->orderSolver = $this->loadService(OrderSolver::class);

+ 5
- 4
common/logic/Order/Order/Repository/OrderRepositoryQuery.php Wyświetl plik

@@ -3,13 +3,14 @@
namespace common\logic\Order\Order\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Order\Order\Model\Order;
use yii\db\ActiveQuery;
use common\logic\Order\Order\Service\OrderDefinition;

class OrderRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected OrderDefinition $definition;

public function loadDependencies(): void
{
return Order::find();
$this->loadDefinition(OrderDefinition::class);
}
}

+ 14
- 0
common/logic/Order/Order/Service/OrderDefinition.php Wyświetl plik

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

namespace common\logic\Order\Order\Service;

use common\logic\AbstractDefinition;
use common\logic\Order\Order\Model\Order;

class OrderDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return Order::class;
}
}

+ 7
- 6
common/logic/Order/Order/Wrapper/OrderContainer.php Wyświetl plik

@@ -3,22 +3,18 @@
namespace common\logic\Order\Order\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Order\Order\Model\Order;
use common\logic\Order\Order\Repository\OrderRepository;
use common\logic\Order\Order\Service\OrderBuilder;
use common\logic\Order\Order\Service\OrderDefinition;
use common\logic\Order\Order\Service\OrderSolver;
use common\logic\Order\Order\Service\OrderUtils;

class OrderContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return Order::class;
}

public function getServices(): array
{
return [
OrderDefinition::class,
OrderSolver::class,
OrderRepository::class,
OrderBuilder::class,
@@ -26,6 +22,11 @@ class OrderContainer extends AbstractContainer
];
}

public function getDefinition(): OrderDefinition
{
return OrderDefinition::getInstance();
}

public function getSolver(): OrderSolver
{
return OrderSolver::getInstance();

+ 2
- 0
common/logic/Order/Order/Wrapper/OrderManager.php Wyświetl plik

@@ -5,9 +5,11 @@ namespace common\logic\Order\Order\Wrapper;
use common\logic\AbstractManager;
use common\logic\Order\Order\Repository\OrderRepository;
use common\logic\Order\Order\Service\OrderBuilder;
use common\logic\Order\Order\Service\OrderDefinition;
use common\logic\Order\Order\Service\OrderSolver;

/**
* @mixin OrderDefinition
* @mixin OrderSolver
* @mixin OrderRepository
* @mixin OrderBuilder

+ 1
- 1
common/logic/Order/OrderStatusHistory/Repository/OrderStatusHistoryRepository.php Wyświetl plik

@@ -10,7 +10,7 @@ class OrderStatusHistoryRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(OrderStatusHistoryRepositoryQuery::class);
$this->loadQuery(OrderStatusHistoryRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array

+ 5
- 2
common/logic/Order/OrderStatusHistory/Repository/OrderStatusHistoryRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\Order\OrderStatusHistory\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Order\OrderStatusHistory\Model\OrderStatusHistory;
use common\logic\Order\OrderStatusHistory\Service\OrderStatusHistoryDefinition;
use yii\db\ActiveQuery;

class OrderStatusHistoryRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected OrderStatusHistoryDefinition $definition;

public function loadDependencies(): void
{
return OrderStatusHistory::find();
$this->loadDefinition(OrderStatusHistoryDefinition::class);
}
}

+ 14
- 0
common/logic/Order/OrderStatusHistory/Service/OrderStatusHistoryDefinition.php Wyświetl plik

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

namespace common\logic\Order\OrderStatusHistory\Service;

use common\logic\AbstractDefinition;
use common\logic\Order\OrderStatusHistory\Model\OrderStatusHistory;

class OrderStatusHistoryDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return OrderStatusHistory::class;
}
}

+ 7
- 6
common/logic/Order/OrderStatusHistory/Wrapper/OrderStatusHistoryContainer.php Wyświetl plik

@@ -3,25 +3,26 @@
namespace common\logic\Order\OrderStatusHistory\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Order\OrderStatusHistory\Model\OrderStatusHistory;
use common\logic\Order\OrderStatusHistory\Repository\OrderStatusHistoryRepository;
use common\logic\Order\OrderStatusHistory\Service\OrderStatusHistoryBuilder;
use common\logic\Order\OrderStatusHistory\Service\OrderStatusHistoryDefinition;

class OrderStatusHistoryContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return OrderStatusHistory::class;
}

public function getServices(): array
{
return [
OrderStatusHistoryDefinition::class,
OrderStatusHistoryRepository::class,
OrderStatusHistoryBuilder::class
];
}

public function getDefinition(): OrderStatusHistoryDefinition
{
return OrderStatusHistoryDefinition::getInstance();
}

public function getRepository(): OrderStatusHistoryRepository
{
return OrderStatusHistoryRepository::getInstance();

+ 2
- 0
common/logic/Order/OrderStatusHistory/Wrapper/OrderStatusHistoryManager.php Wyświetl plik

@@ -5,8 +5,10 @@ namespace common\logic\Order\OrderStatusHistory\Wrapper;
use common\logic\AbstractManager;
use common\logic\Order\OrderStatusHistory\Repository\OrderStatusHistoryRepository;
use common\logic\Order\OrderStatusHistory\Service\OrderStatusHistoryBuilder;
use common\logic\Order\OrderStatusHistory\Service\OrderStatusHistoryDefinition;

/**
* @mixin OrderStatusHistoryDefinition
* @mixin OrderStatusHistoryRepository
* @mixin OrderStatusHistoryBuilder
*/

+ 1
- 1
common/logic/Order/ProductOrder/Repository/ProductOrderRepository.php Wyświetl plik

@@ -12,7 +12,7 @@ class ProductOrderRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(ProductOrderRepositoryQuery::class);
$this->loadQuery(ProductOrderRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array

+ 5
- 2
common/logic/Order/ProductOrder/Repository/ProductOrderRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\Order\ProductOrder\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Order\ProductOrder\Model\ProductOrder;
use common\logic\Order\ProductOrder\Service\ProductOrderDefinition;
use yii\db\ActiveQuery;

class ProductOrderRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected ProductOrderDefinition $definition;

public function loadDependencies(): void
{
return ProductOrder::find();
$this->loadDefinition(ProductOrderDefinition::class);
}
}

+ 14
- 0
common/logic/Order/ProductOrder/Service/ProductOrderDefinition.php Wyświetl plik

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

namespace common\logic\Order\ProductOrder\Service;

use common\logic\AbstractDefinition;
use common\logic\Order\ProductOrder\Model\ProductOrder;

class ProductOrderDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return ProductOrder::class;
}
}

+ 7
- 6
common/logic/Order/ProductOrder/Wrapper/ProductOrderContainer.php Wyświetl plik

@@ -3,27 +3,28 @@
namespace common\logic\Order\ProductOrder\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Order\ProductOrder\Model\ProductOrder;
use common\logic\Order\ProductOrder\Repository\ProductOrderRepository;
use common\logic\Order\ProductOrder\Service\ProductOrderBuilder;
use common\logic\Order\ProductOrder\Service\ProductOrderDefinition;
use common\logic\Order\ProductOrder\Service\ProductOrderSolver;

class ProductOrderContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return ProductOrder::class;
}

public function getServices(): array
{
return [
ProductOrderDefinition::class,
ProductOrderSolver::class,
ProductOrderRepository::class,
ProductOrderBuilder::class,
];
}

public function getDefinition(): ProductOrderDefinition
{
return ProductOrderDefinition::getInstance();
}

public function getSolver(): ProductOrderSolver
{
return ProductOrderSolver::getInstance();

+ 2
- 0
common/logic/Order/ProductOrder/Wrapper/ProductOrderManager.php Wyświetl plik

@@ -5,9 +5,11 @@ namespace common\logic\Order\ProductOrder\Wrapper;
use common\logic\AbstractManager;
use common\logic\Order\ProductOrder\Repository\ProductOrderRepository;
use common\logic\Order\ProductOrder\Service\ProductOrderBuilder;
use common\logic\Order\ProductOrder\Service\ProductOrderDefinition;
use common\logic\Order\ProductOrder\Service\ProductOrderSolver;

/**
* @mixin ProductOrderDefinition
* @mixin ProductOrderSolver
* @mixin ProductOrderRepository
* @mixin ProductOrderBuilder

+ 1
- 1
common/logic/PointSale/PointSale/Repository/PointSaleRepository.php Wyświetl plik

@@ -15,7 +15,7 @@ class PointSaleRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(PointSaleRepositoryQuery::class);
$this->loadQuery(PointSaleRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array

+ 5
- 2
common/logic/PointSale/PointSale/Repository/PointSaleRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\PointSale\PointSale\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\PointSale\PointSale\Service\PointSaleDefinition;
use yii\db\ActiveQuery;

class PointSaleRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected PointSaleDefinition $definition;

public function loadDependencies(): void
{
return PointSale::find();
$this->loadDefinition(PointSaleDefinition::class);
}
}

+ 14
- 0
common/logic/PointSale/PointSale/Service/PointSaleDefinition.php Wyświetl plik

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

namespace common\logic\PointSale\PointSale\Service;

use common\logic\AbstractDefinition;
use common\logic\PointSale\PointSale\Model\PointSale;

class PointSaleDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return PointSale::class;
}
}

+ 7
- 6
common/logic/PointSale/PointSale/Wrapper/PointSaleContainer.php Wyświetl plik

@@ -3,27 +3,28 @@
namespace common\logic\PointSale\PointSale\Wrapper;

use common\logic\AbstractContainer;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\PointSale\PointSale\Repository\PointSaleRepository;
use common\logic\PointSale\PointSale\Service\PointSaleBuilder;
use common\logic\PointSale\PointSale\Service\PointSaleDefinition;
use common\logic\PointSale\PointSale\Service\PointSaleSolver;

class PointSaleContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return PointSale::class;
}

public function getServices(): array
{
return [
PointSaleDefinition::class,
PointSaleSolver::class,
PointSaleRepository::class,
PointSaleBuilder::class,
];
}

public function getDefinition(): PointSaleDefinition
{
return PointSaleDefinition::getInstance();
}

public function getSolver(): PointSaleSolver
{
return PointSaleSolver::getInstance();

+ 2
- 0
common/logic/PointSale/PointSale/Wrapper/PointSaleManager.php Wyświetl plik

@@ -5,9 +5,11 @@ namespace common\logic\PointSale\PointSale\Wrapper;
use common\logic\AbstractManager;
use common\logic\PointSale\PointSale\Repository\PointSaleRepository;
use common\logic\PointSale\PointSale\Service\PointSaleBuilder;
use common\logic\PointSale\PointSale\Service\PointSaleDefinition;
use common\logic\PointSale\PointSale\Service\PointSaleSolver;

/**
* @mixin PointSaleDefinition
* @mixin PointSaleSolver
* @mixin PointSaleRepository
* @mixin PointSaleBuilder

+ 1
- 1
common/logic/PointSale/UserPointSale/Repository/UserPointSaleRepository.php Wyświetl plik

@@ -13,7 +13,7 @@ class UserPointSaleRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(UserPointSaleRepositoryQuery::class);
$this->loadQuery(UserPointSaleRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array

+ 5
- 2
common/logic/PointSale/UserPointSale/Repository/UserPointSaleRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\PointSale\UserPointSale\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\PointSale\UserPointSale\Model\UserPointSale;
use common\logic\PointSale\UserPointSale\Service\UserPointSaleDefinition;
use yii\db\ActiveQuery;

class UserPointSaleRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected UserPointSaleDefinition $definition;

public function loadDependencies(): void
{
return UserPointSale::find();
$this->loadDefinition(UserPointSaleDefinition::class);
}
}

+ 14
- 0
common/logic/PointSale/UserPointSale/Service/UserPointSaleDefinition.php Wyświetl plik

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

namespace common\logic\PointSale\UserPointSale\Service;

use common\logic\AbstractDefinition;
use common\logic\PointSale\UserPointSale\Model\UserPointSale;

class UserPointSaleDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return UserPointSale::class;
}
}

+ 7
- 6
common/logic/PointSale/UserPointSale/Wrapper/UserPointSaleContainer.php Wyświetl plik

@@ -3,25 +3,26 @@
namespace common\logic\PointSale\UserPointSale\Wrapper;

use common\logic\AbstractContainer;
use common\logic\PointSale\UserPointSale\Model\UserPointSale;
use common\logic\PointSale\UserPointSale\Repository\UserPointSaleRepository;
use common\logic\PointSale\UserPointSale\Service\UserPointSaleBuilder;
use common\logic\PointSale\UserPointSale\Service\UserPointSaleDefinition;

class UserPointSaleContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return UserPointSale::class;
}

public function getServices(): array
{
return [
UserPointSaleDefinition::class,
UserPointSaleRepository::class,
UserPointSaleBuilder::class,
];
}

public function getDefinition(): UserPointSaleDefinition
{
return UserPointSaleDefinition::getInstance();
}

public function getRepository(): UserPointSaleRepository
{
return UserPointSaleRepository::getInstance();

+ 2
- 0
common/logic/PointSale/UserPointSale/Wrapper/UserPointSaleManager.php Wyświetl plik

@@ -5,8 +5,10 @@ namespace common\logic\PointSale\UserPointSale\Wrapper;
use common\logic\AbstractManager;
use common\logic\PointSale\UserPointSale\Repository\UserPointSaleRepository;
use common\logic\PointSale\UserPointSale\Service\UserPointSaleBuilder;
use common\logic\PointSale\UserPointSale\Service\UserPointSaleDefinition;

/**
* @mixin UserPointSaleDefinition
* @mixin UserPointSaleRepository
* @mixin UserPointSaleBuilder
*/

+ 1
- 1
common/logic/Producer/Producer/Repository/ProducerRepository.php Wyświetl plik

@@ -24,7 +24,7 @@ class ProducerRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(ProducerRepositoryQuery::class);
$this->loadQuery(ProducerRepositoryQuery::class);
$this->producerPriceRangeRepository = $this->loadService(ProducerPriceRangeRepository::class);
$this->producerSolver = $this->loadService(ProducerSolver::class);
$this->documentSolver = $this->loadService(DocumentSolver::class);

+ 5
- 2
common/logic/Producer/Producer/Repository/ProducerRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\Producer\Producer\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Producer\Producer\Service\ProducerDefinition;
use yii\db\ActiveQuery;

class ProducerRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected ProducerDefinition $definition;

public function loadDependencies(): void
{
return Producer::find();
$this->loadDefinition(ProducerDefinition::class);
}
}

+ 14
- 0
common/logic/Producer/Producer/Service/ProducerDefinition.php Wyświetl plik

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

namespace common\logic\Producer\Producer\Service;

use common\logic\AbstractDefinition;
use common\logic\Producer\Producer\Model\Producer;

class ProducerDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return Producer::class;
}
}

+ 7
- 6
common/logic/Producer/Producer/Wrapper/ProducerContainer.php Wyświetl plik

@@ -3,22 +3,18 @@
namespace common\logic\Producer\Producer\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Producer\Producer\Repository\ProducerRepository;
use common\logic\Producer\Producer\Service\ProducerBuilder;
use common\logic\Producer\Producer\Service\ProducerDefinition;
use common\logic\Producer\Producer\Service\ProducerSolver;
use common\logic\Producer\Producer\Service\ProducerUtils;

class ProducerContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return Producer::class;
}

public function getServices(): array
{
return [
ProducerDefinition::class,
ProducerSolver::class,
ProducerRepository::class,
ProducerBuilder::class,
@@ -26,6 +22,11 @@ class ProducerContainer extends AbstractContainer
];
}

public function getDefinition(): ProducerDefinition
{
return ProducerDefinition::getInstance();
}

public function getSolver(): ProducerSolver
{
return ProducerSolver::getInstance();

+ 2
- 0
common/logic/Producer/Producer/Wrapper/ProducerManager.php Wyświetl plik

@@ -5,10 +5,12 @@ namespace common\logic\Producer\Producer\Wrapper;
use common\logic\AbstractManager;
use common\logic\Producer\Producer\Repository\ProducerRepository;
use common\logic\Producer\Producer\Service\ProducerBuilder;
use common\logic\Producer\Producer\Service\ProducerDefinition;
use common\logic\Producer\Producer\Service\ProducerSolver;
use common\logic\Producer\Producer\Service\ProducerUtils;

/**
* @mixin ProducerDefinition
* @mixin ProducerSolver
* @mixin ProducerRepository
* @mixin ProducerBuilder

+ 1
- 1
common/logic/Producer/ProducerPriceRange/Repository/ProducerPriceRangeRepository.php Wyświetl plik

@@ -12,7 +12,7 @@ class ProducerPriceRangeRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(ProducerPriceRangeRepositoryQuery::class);
$this->loadQuery(ProducerPriceRangeRepositoryQuery::class);
}

/**

+ 5
- 2
common/logic/Producer/ProducerPriceRange/Repository/ProducerPriceRangeRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\Producer\ProducerPriceRange\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Producer\ProducerPriceRange\Model\ProducerPriceRange;
use common\logic\Producer\ProducerPriceRange\Service\ProducerPriceRangeDefinition;
use yii\db\ActiveQuery;

class ProducerPriceRangeRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected ProducerPriceRangeDefinition $definition;

public function loadDependencies(): void
{
return ProducerPriceRange::find();
$this->loadDefinition(ProducerPriceRangeDefinition::class);
}
}

+ 13
- 0
common/logic/Producer/ProducerPriceRange/Service/ProducerPriceRangeDefinition.php Wyświetl plik

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

namespace common\logic\Producer\ProducerPriceRange\Service;

use common\logic\AbstractDefinition;

class ProducerPriceRangeDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return ProducerPriceRangeDefinition::class;
}
}

+ 7
- 6
common/logic/Producer/ProducerPriceRange/Wrapper/ProducerPriceRangeContainer.php Wyświetl plik

@@ -3,25 +3,26 @@
namespace common\logic\Producer\ProducerPriceRange\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Producer\ProducerPriceRange\Model\ProducerPriceRange;
use common\logic\Producer\ProducerPriceRange\Repository\ProducerPriceRangeRepository;
use common\logic\Producer\ProducerPriceRange\Service\ProducerPriceRangeBuilder;
use common\logic\Producer\ProducerPriceRange\Service\ProducerPriceRangeDefinition;

class ProducerPriceRangeContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return ProducerPriceRange::class;
}

public function getServices(): array
{
return [
ProducerPriceRangeDefinition::class,
ProducerPriceRangeRepository::class,
ProducerPriceRangeBuilder::class,
];
}

public function getDefinition(): ProducerPriceRangeDefinition
{
return ProducerPriceRangeDefinition::getInstance();
}

public function getRepository(): ProducerPriceRangeRepository
{
return ProducerPriceRangeRepository::getInstance();

+ 2
- 0
common/logic/Producer/ProducerPriceRange/Wrapper/ProducerPriceRangeManager.php Wyświetl plik

@@ -5,8 +5,10 @@ namespace common\logic\Producer\ProducerPriceRange\Wrapper;
use common\logic\AbstractManager;
use common\logic\Producer\ProducerPriceRange\Repository\ProducerPriceRangeRepository;
use common\logic\Producer\ProducerPriceRange\Service\ProducerPriceRangeBuilder;
use common\logic\Producer\ProducerPriceRange\Service\ProducerPriceRangeDefinition;

/**
* @mixin ProducerPriceRangeDefinition
* @mixin ProducerPriceRangeRepository
* @mixin ProducerPriceRangeBuilder
*/

+ 1
- 1
common/logic/Product/Product/Repository/ProductRepository.php Wyświetl plik

@@ -23,7 +23,7 @@ class ProductRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(ProductRepositoryQuery::class);
$this->loadQuery(ProductRepositoryQuery::class);
$this->productSolver = $this->loadService(ProductSolver::class);
$this->productPriceSolver = $this->loadService(ProductPriceSolver::class);
$this->userProducerRepository = $this->loadService(UserProducerRepository::class);

+ 5
- 4
common/logic/Product/Product/Repository/ProductRepositoryQuery.php Wyświetl plik

@@ -3,13 +3,14 @@
namespace common\logic\Product\Product\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Product\Product\Model\Product;
use yii\db\ActiveQuery;
use common\logic\Product\Product\Service\ProductDefinition;

class ProductRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected ProductDefinition $definition;

public function loadDependencies(): void
{
return Product::find();
$this->loadDefinition(ProductDefinition::class);
}
}

+ 14
- 0
common/logic/Product/Product/Service/ProductDefinition.php Wyświetl plik

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

namespace common\logic\Product\Product\Service;

use common\logic\AbstractDefinition;
use common\logic\Product\Product\Model\Product;

class ProductDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return Product::class;
}
}

+ 8
- 6
common/logic/Product/Product/Wrapper/ProductContainer.php Wyświetl plik

@@ -3,27 +3,29 @@
namespace common\logic\Product\Product\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Product\Product\Model\Product;
use common\logic\DefinitionInterface;
use common\logic\Product\Product\Repository\ProductRepository;
use common\logic\Product\Product\Service\ProductBuilder;
use common\logic\Product\Product\Service\ProductDefinition;
use common\logic\Product\Product\Service\ProductSolver;

class ProductContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return Product::class;
}

public function getServices(): array
{
return [
ProductDefinition::class,
ProductSolver::class,
ProductBuilder::class,
ProductRepository::class,
];
}

public function getDefinition(): DefinitionInterface
{
return ProductDefinition::getInstance();
}

public function getSolver(): ProductSolver
{
return ProductSolver::getInstance();

+ 2
- 0
common/logic/Product/Product/Wrapper/ProductManager.php Wyświetl plik

@@ -5,9 +5,11 @@ namespace common\logic\Product\Product\Wrapper;
use common\logic\AbstractManager;
use common\logic\Product\Product\Repository\ProductRepository;
use common\logic\Product\Product\Service\ProductBuilder;
use common\logic\Product\Product\Service\ProductDefinition;
use common\logic\Product\Product\Service\ProductSolver;

/**
* @mixin ProductDefinition
* @mixin ProductSolver
* @mixin ProductRepository
* @mixin ProductBuilder

+ 1
- 1
common/logic/Product/ProductCategory/Repository/ProductCategoryRepository.php Wyświetl plik

@@ -11,7 +11,7 @@ class ProductCategoryRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(ProductCategoryRepositoryQuery::class);
$this->loadQuery(ProductCategoryRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array

+ 5
- 2
common/logic/Product/ProductCategory/Repository/ProductCategoryRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\Product\ProductCategory\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Product\ProductCategory\Model\ProductCategory;
use common\logic\Product\ProductCategory\Service\ProductCategoryDefinition;
use yii\db\ActiveQuery;

class ProductCategoryRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected ProductCategoryDefinition $definition;

public function loadDependencies(): void
{
return ProductCategory::find();
$this->loadDefinition(ProductCategoryDefinition::class);
}
}

+ 15
- 0
common/logic/Product/ProductCategory/Service/ProductCategoryDefinition.php Wyświetl plik

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

namespace common\logic\Product\ProductCategory\Service;

use common\logic\AbstractDefinition;
use common\logic\Product\ProductCategory\Model\ProductCategory;

class ProductCategoryDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return ProductCategory::class;
}

}

+ 8
- 6
common/logic/Product/ProductCategory/Wrapper/ProductCategoryContainer.php Wyświetl plik

@@ -3,25 +3,27 @@
namespace common\logic\Product\ProductCategory\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Product\ProductCategory\Model\ProductCategory;
use common\logic\DefinitionInterface;
use common\logic\Product\ProductCategory\Repository\ProductCategoryRepository;
use common\logic\Product\ProductCategory\Service\ProductCategoryBuilder;
use common\logic\Product\ProductCategory\Service\ProductCategoryDefinition;

class ProductCategoryContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return ProductCategory::class;
}

public function getServices(): array
{
return [
ProductCategoryDefinition::class,
ProductCategoryBuilder::class,
ProductCategoryRepository::class
];
}

public function getDefinition(): DefinitionInterface
{
return ProductCategoryDefinition::getInstance();
}

public function getBuilder(): ProductCategoryBuilder
{
return ProductCategoryBuilder::getInstance();

+ 2
- 0
common/logic/Product/ProductCategory/Wrapper/ProductCategoryManager.php Wyświetl plik

@@ -5,8 +5,10 @@ namespace common\logic\Product\ProductCategory\Wrapper;
use common\logic\AbstractManager;
use common\logic\Product\ProductCategory\Repository\ProductCategoryRepository;
use common\logic\Product\ProductCategory\Service\ProductCategoryBuilder;
use common\logic\Product\ProductCategory\Service\ProductCategoryDefinition;

/**
* @mixin ProductCategoryDefinition
* @mixin ProductCategoryRepository
* @mixin ProductCategoryBuilder
*/

+ 1
- 1
common/logic/Product/ProductPointSale/Repository/ProductPointSaleRepository.php Wyświetl plik

@@ -10,7 +10,7 @@ class ProductPointSaleRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(ProductPointSaleRepositoryQuery::class);
$this->loadQuery(ProductPointSaleRepositoryQuery::class);
}

public function getDefaultOptionsSearch(): array

+ 5
- 2
common/logic/Product/ProductPointSale/Repository/ProductPointSaleRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\Product\ProductPointSale\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Product\ProductPointSale\Model\ProductPointSale;
use common\logic\Product\ProductPointSale\Service\ProductPointSaleDefinition;
use yii\db\ActiveQuery;

class ProductPointSaleRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected ProductPointSaleDefinition $definition;

public function loadDependencies(): void
{
return ProductPointSale::find();
$this->loadDefinition(ProductPointSaleDefinition::class);
}
}

+ 14
- 0
common/logic/Product/ProductPointSale/Service/ProductPointSaleDefinition.php Wyświetl plik

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

namespace common\logic\Product\ProductPointSale\Service;

use common\logic\AbstractDefinition;
use common\logic\Product\ProductPointSale\Model\ProductPointSale;

class ProductPointSaleDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return ProductPointSale::class;
}
}

+ 8
- 6
common/logic/Product/ProductPointSale/Wrapper/ProductPointSaleContainer.php Wyświetl plik

@@ -3,25 +3,27 @@
namespace common\logic\Product\ProductPointSale\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Product\ProductPointSale\Model\ProductPointSale;
use common\logic\DefinitionInterface;
use common\logic\Product\ProductPointSale\Repository\ProductPointSaleRepository;
use common\logic\Product\ProductPointSale\Service\ProductPointSaleBuilder;
use common\logic\Product\ProductPointSale\Service\ProductPointSaleDefinition;

class ProductPointSaleContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return ProductPointSale::class;
}

public function getServices(): array
{
return [
ProductPointSaleDefinition::class,
ProductPointSaleRepository::class,
ProductPointSaleBuilder::class,
];
}

public function getDefinition(): DefinitionInterface
{
return ProductPointSaleDefinition::getInstance();
}

public function getRepository(): ProductPointSaleRepository
{
return ProductPointSaleRepository::getInstance();

+ 2
- 0
common/logic/Product/ProductPointSale/Wrapper/ProductPointSaleManager.php Wyświetl plik

@@ -5,8 +5,10 @@ namespace common\logic\Product\ProductPointSale\Wrapper;
use common\logic\AbstractManager;
use common\logic\Product\ProductPointSale\Repository\ProductPointSaleRepository;
use common\logic\Product\ProductPointSale\Service\ProductPointSaleBuilder;
use common\logic\Product\ProductPointSale\Service\ProductPointSaleDefinition;

/**
* @mixin ProductPointSaleDefinition
* @mixin ProductPointSaleRepository
* @mixin ProductPointSaleBuilder
*/

+ 1
- 1
common/logic/Product/ProductPrice/Repository/ProductPriceRepository.php Wyświetl plik

@@ -15,7 +15,7 @@ class ProductPriceRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(ProductPriceRepositoryQuery::class);
$this->loadQuery(ProductPriceRepositoryQuery::class);
}

/**

+ 5
- 2
common/logic/Product/ProductPrice/Repository/ProductPriceRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\Product\ProductPrice\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Product\ProductPrice\Model\ProductPrice;
use common\logic\Product\ProductPrice\Service\ProductPriceDefinition;
use yii\db\ActiveQuery;

class ProductPriceRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected ProductPriceDefinition $definition;

public function loadDependencies(): void
{
return ProductPrice::find();
$this->loadDefinition(ProductPriceDefinition::class);
}
}

+ 14
- 0
common/logic/Product/ProductPrice/Service/ProductPriceDefinition.php Wyświetl plik

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

namespace common\logic\Product\ProductPrice\Service;

use common\logic\AbstractDefinition;
use common\logic\Product\ProductPrice\Model\ProductPrice;

class ProductPriceDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return ProductPrice::class;
}
}

+ 7
- 6
common/logic/Product/ProductPrice/Wrapper/ProductPriceContainer.php Wyświetl plik

@@ -3,27 +3,28 @@
namespace common\logic\Product\ProductPrice\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Product\ProductPrice\Model\ProductPrice;
use common\logic\Product\ProductPrice\Repository\ProductPriceRepository;
use common\logic\Product\ProductPrice\Service\ProductPriceBuilder;
use common\logic\Product\ProductPrice\Service\ProductPriceDefinition;
use common\logic\Product\ProductPrice\Service\ProductPriceSolver;

class ProductPriceContainer extends AbstractContainer
{
public function getEntityFqcn(): string
{
return ProductPrice::class;
}

public function getServices(): array
{
return [
ProductPriceDefinition::class,
ProductPriceSolver::class,
ProductPriceBuilder::class,
ProductPriceRepository::class
];
}

public function getDefinition(): ProductPriceDefinition
{
return ProductPriceDefinition::getInstance();
}

public function getBuilder(): ProductPriceBuilder
{
return ProductPriceBuilder::getInstance();

+ 2
- 0
common/logic/Product/ProductPrice/Wrapper/ProductPriceManager.php Wyświetl plik

@@ -5,8 +5,10 @@ namespace common\logic\Product\ProductPrice\Wrapper;
use common\logic\AbstractManager;
use common\logic\Product\ProductPrice\Repository\ProductPriceRepository;
use common\logic\Product\ProductPrice\Service\ProductPriceBuilder;
use common\logic\Product\ProductPrice\Service\ProductPriceDefinition;

/**
* @mixin ProductPriceDefinition
* @mixin ProductPriceRepository
* @mixin ProductPriceBuilder
*/

+ 1
- 1
common/logic/RepositoryQueryInterface.php Wyświetl plik

@@ -6,5 +6,5 @@ use yii\db\ActiveQuery;

interface RepositoryQueryInterface
{
public function baseQuery(): ActiveQuery;
}

+ 1
- 1
common/logic/Subscription/ProductSubscription/Repository/ProductSubscriptionRepository.php Wyświetl plik

@@ -12,7 +12,7 @@ class ProductSubscriptionRepository extends AbstractRepository

public function loadDependencies(): void
{
$this->query = $this->loadService(ProductSubscriptionRepositoryQuery::class);
$this->loadQuery(ProductSubscriptionRepositoryQuery::class);
}

/**

+ 5
- 2
common/logic/Subscription/ProductSubscription/Repository/ProductSubscriptionRepositoryQuery.php Wyświetl plik

@@ -4,12 +4,15 @@ namespace common\logic\Subscription\ProductSubscription\Repository;

use common\logic\AbstractRepositoryQuery;
use common\logic\Subscription\ProductSubscription\Model\ProductSubscription;
use common\logic\Subscription\ProductSubscription\Service\ProductSubscriptionDefinition;
use yii\db\ActiveQuery;

class ProductSubscriptionRepositoryQuery extends AbstractRepositoryQuery
{
public function baseQuery(): ActiveQuery
protected ProductSubscriptionDefinition $definition;

public function loadDependencies(): void
{
return ProductSubscription::find();
$this->loadDefinition(ProductSubscriptionDefinition::class);
}
}

+ 14
- 0
common/logic/Subscription/ProductSubscription/Service/ProductSubscriptionDefinition.php Wyświetl plik

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

namespace common\logic\Subscription\ProductSubscription\Service;

use common\logic\AbstractDefinition;
use common\logic\Subscription\ProductSubscription\Model\ProductSubscription;

class ProductSubscriptionDefinition extends AbstractDefinition
{
public function getEntityFqcn(): string
{
return ProductSubscription::class;
}
}

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików

Ładowanie…
Anuluj
Zapisz