소스 검색

[Technique] Refactoring Feature

feature/souke
Guillaume Bourgeois 1 년 전
부모
커밋
9222c2f34a
24개의 변경된 파일33개의 추가작업 그리고 96개의 파일을 삭제
  1. +1
    -1
      backend/views/layouts/left.php
  2. +2
    -2
      backend/views/producer/update.php
  3. +0
    -1
      common/components/BusinessLogic.php
  4. +1
    -7
      common/components/BusinessLogicTrait.php
  5. +3
    -3
      common/logic/Distribution/Distribution/Export/DistributionShoppingCartLabelsPdfGenerator.php
  6. +2
    -3
      common/logic/Feature/Feature/Feature.php
  7. +1
    -3
      common/logic/Feature/Feature/FeatureBuilder.php
  8. +2
    -3
      common/logic/Feature/Feature/FeatureChecker.php
  9. +1
    -2
      common/logic/Feature/Feature/FeatureDefinition.php
  10. +1
    -1
      common/logic/Feature/Feature/FeatureImporter.php
  11. +2
    -3
      common/logic/Feature/Feature/FeatureManager.php
  12. +1
    -7
      common/logic/Feature/Feature/FeatureModule.php
  13. +1
    -2
      common/logic/Feature/Feature/FeatureRepository.php
  14. +1
    -2
      common/logic/Feature/Feature/FeatureRepositoryQuery.php
  15. +2
    -2
      common/logic/Feature/FeatureProducer/FeatureProducer.php
  16. +2
    -5
      common/logic/Feature/FeatureProducer/FeatureProducerBuilder.php
  17. +1
    -3
      common/logic/Feature/FeatureProducer/FeatureProducerDefinition.php
  18. +2
    -3
      common/logic/Feature/FeatureProducer/FeatureProducerRepository.php
  19. +2
    -3
      common/logic/Feature/FeatureProducer/FeatureProducerRepositoryQuery.php
  20. +0
    -35
      common/logic/Feature/FeatureProducer/Module/FeatureProducerModule.php
  21. +1
    -1
      console/commands/ImportFeaturesController.php
  22. +1
    -1
      producer/controllers/CreditController.php
  23. +1
    -1
      producer/controllers/SiteController.php
  24. +2
    -2
      producer/views/credit/history.php

+ 1
- 1
backend/views/layouts/left.php 파일 보기

@@ -37,7 +37,7 @@
*/

use common\helpers\GlobalParam;
use common\logic\Feature\Feature\Model\Feature;
use common\logic\Feature\Feature\Feature;
use common\logic\User\User\Module\UserModule;

$producerModule = $this->getProducerModule();

+ 2
- 2
backend/views/producer/update.php 파일 보기

@@ -40,8 +40,8 @@ use common\helpers\Dropdown;
use common\helpers\GlobalParam;
use common\logic\Distribution\Distribution\Module\DistributionModule;
use common\logic\Distribution\Distribution\Service\ExportManager;
use common\logic\Feature\Feature\Model\Feature;
use common\logic\Feature\Feature\Module\FeatureModule;
use common\logic\Feature\Feature\Feature;
use common\logic\Feature\Feature\FeatureModule;
use common\logic\User\User\Module\UserModule;
use common\logic\User\UserGroup\Module\UserGroupModule;
use yii\helpers\Html;

+ 0
- 1
common/components/BusinessLogic.php 파일 보기

@@ -16,7 +16,6 @@ class BusinessLogic
{
return [
$this->getFeatureModule(),
$this->getFeatureProducerModule(),
$this->getUnitModule(),
$this->getTaxRateModule(),
$this->getUserUserGroupModule(),

+ 1
- 7
common/components/BusinessLogicTrait.php 파일 보기

@@ -11,8 +11,7 @@ use common\logic\Document\DeliveryNote\Module\DeliveryNoteModule;
use common\logic\Document\Document\Module\DocumentModule;
use common\logic\Document\Invoice\Module\InvoiceModule;
use common\logic\Document\Quotation\Module\QuotationModule;
use common\logic\Feature\Feature\Module\FeatureModule;
use common\logic\Feature\FeatureProducer\Module\FeatureProducerModule;
use common\logic\Feature\Feature\FeatureModule;
use common\logic\Opinion\Module\OpinionModule;
use common\logic\Order\Order\Module\OrderModule;
use common\logic\Order\ProductOrder\Module\ProductOrderModule;
@@ -191,9 +190,4 @@ trait BusinessLogicTrait
{
return FeatureModule::getInstance();
}

public function getFeatureProducerModule(): FeatureProducerModule
{
return FeatureProducerModule::getInstance();
}
}

+ 3
- 3
common/logic/Distribution/Distribution/Export/DistributionShoppingCartLabelsPdfGenerator.php 파일 보기

@@ -4,9 +4,9 @@ namespace common\logic\Distribution\Distribution\Export;

use common\logic\AbstractGenerator;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Feature\Feature\Model\Feature;
use common\logic\Feature\Feature\Service\FeatureChecker;
use common\logic\Feature\Feature\Service\FeatureManager;
use common\logic\Feature\Feature\Feature;
use common\logic\Feature\Feature\FeatureChecker;
use common\logic\Feature\Feature\FeatureManager;
use common\logic\Order\Order\Model\Order;
use common\logic\Order\Order\Repository\OrderRepository;
use common\logic\Order\Order\Service\OrderSolver;

common/logic/Feature/Feature/Model/Feature.php → common/logic/Feature/Feature/Feature.php 파일 보기

@@ -36,12 +36,11 @@
* termes.
*/

namespace common\logic\Feature\Feature\Model;
namespace common\logic\Feature\Feature;

use common\components\ActiveRecordCommon;
use common\logic\Feature\FeatureProducer\Model\FeatureProducer;
use common\logic\Feature\FeatureProducer\FeatureProducer;
use yii\db\ActiveQuery;
use yii\db\Schema;

class Feature extends ActiveRecordCommon
{

common/logic/Feature/Feature/Service/FeatureBuilder.php → common/logic/Feature/Feature/FeatureBuilder.php 파일 보기

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

namespace common\logic\Feature\Feature\Service;
namespace common\logic\Feature\Feature;

use common\logic\AbstractBuilder;
use common\logic\Feature\Feature\Model\Feature;
use common\logic\Feature\Feature\Repository\FeatureRepository;

class FeatureBuilder extends AbstractBuilder
{

common/logic/Feature/Feature/Service/FeatureChecker.php → common/logic/Feature/Feature/FeatureChecker.php 파일 보기

@@ -1,10 +1,9 @@
<?php

namespace common\logic\Feature\Feature\Service;
namespace common\logic\Feature\Feature;

use common\logic\AbstractChecker;
use common\logic\Feature\Feature\Repository\FeatureRepository;
use common\logic\Feature\FeatureProducer\Repository\FeatureProducerRepository;
use common\logic\Feature\FeatureProducer\FeatureProducerRepository;
use yii\base\ErrorException;

class FeatureChecker extends AbstractChecker

common/logic/Feature/Feature/Service/FeatureDefinition.php → common/logic/Feature/Feature/FeatureDefinition.php 파일 보기

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

namespace common\logic\Feature\Feature\Service;
namespace common\logic\Feature\Feature;

use common\logic\AbstractDefinition;
use common\logic\Feature\Feature\Model\Feature;

class FeatureDefinition extends AbstractDefinition
{

common/logic/Feature/Feature/Service/FeatureImporter.php → common/logic/Feature/Feature/FeatureImporter.php 파일 보기

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Feature\Feature\Service;
namespace common\logic\Feature\Feature;

use common\logic\AbstractManager;


common/logic/Feature/Feature/Service/FeatureManager.php → common/logic/Feature/Feature/FeatureManager.php 파일 보기

@@ -1,10 +1,9 @@
<?php

namespace common\logic\Feature\Feature\Service;
namespace common\logic\Feature\Feature;

use common\logic\AbstractManager;
use common\logic\Feature\Feature\Model\Feature;
use common\logic\Feature\FeatureProducer\Service\FeatureProducerBuilder;
use common\logic\Feature\FeatureProducer\FeatureProducerBuilder;

class FeatureManager extends AbstractManager
{

common/logic/Feature/Feature/Module/FeatureModule.php → common/logic/Feature/Feature/FeatureModule.php 파일 보기

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

namespace common\logic\Feature\Feature\Module;
namespace common\logic\Feature\Feature;

use common\logic\AbstractModule;
use common\logic\Feature\Feature\Repository\FeatureRepository;
use common\logic\Feature\Feature\Service\FeatureBuilder;
use common\logic\Feature\Feature\Service\FeatureChecker;
use common\logic\Feature\Feature\Service\FeatureDefinition;
use common\logic\Feature\Feature\Service\FeatureImporter;
use common\logic\Feature\Feature\Service\FeatureManager;

class FeatureModule extends AbstractModule
{

common/logic/Feature/Feature/Repository/FeatureRepository.php → common/logic/Feature/Feature/FeatureRepository.php 파일 보기

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

namespace common\logic\Feature\Feature\Repository;
namespace common\logic\Feature\Feature;

use common\logic\AbstractRepository;
use common\logic\Feature\Feature\Model\Feature;

class FeatureRepository extends AbstractRepository
{

common/logic/Feature/Feature/Repository/FeatureRepositoryQuery.php → common/logic/Feature/Feature/FeatureRepositoryQuery.php 파일 보기

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

namespace common\logic\Feature\Feature\Repository;
namespace common\logic\Feature\Feature;

use common\logic\AbstractRepositoryQuery;
use common\logic\Feature\Feature\Service\FeatureDefinition;

class FeatureRepositoryQuery extends AbstractRepositoryQuery
{

common/logic/Feature/FeatureProducer/Model/FeatureProducer.php → common/logic/Feature/FeatureProducer/FeatureProducer.php 파일 보기

@@ -36,10 +36,10 @@
* termes.
*/

namespace common\logic\Feature\FeatureProducer\Model;
namespace common\logic\Feature\FeatureProducer;

use common\components\ActiveRecordCommon;
use common\logic\Feature\Feature\Model\Feature;
use common\logic\Feature\Feature\Feature;
use common\logic\Producer\Producer\Model\Producer;
use yii\db\ActiveQuery;


common/logic/Feature/FeatureProducer/Service/FeatureProducerBuilder.php → common/logic/Feature/FeatureProducer/FeatureProducerBuilder.php 파일 보기

@@ -1,12 +1,9 @@
<?php

namespace common\logic\Feature\FeatureProducer\Service;
namespace common\logic\Feature\FeatureProducer;

use common\logic\AbstractBuilder;
use common\logic\Feature\Feature\Model\Feature;
use common\logic\Feature\FeatureProducer\Model\FeatureProducer;
use common\logic\Feature\FeatureProducer\Repository\FeatureProducerRepository;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Feature\Feature\Feature;

class FeatureProducerBuilder extends AbstractBuilder
{

common/logic/Feature/FeatureProducer/Service/FeatureProducerDefinition.php → common/logic/Feature/FeatureProducer/FeatureProducerDefinition.php 파일 보기

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

namespace common\logic\Feature\FeatureProducer\Service;
namespace common\logic\Feature\FeatureProducer;

use common\logic\AbstractDefinition;
use common\logic\Feature\FeatureProducer\Model\FeatureProducer;
use common\logic\Feature\FeatureProducer\Repository\FeatureProducerRepository;

class FeatureProducerDefinition extends AbstractDefinition
{

common/logic/Feature/FeatureProducer/Repository/FeatureProducerRepository.php → common/logic/Feature/FeatureProducer/FeatureProducerRepository.php 파일 보기

@@ -1,10 +1,9 @@
<?php

namespace common\logic\Feature\FeatureProducer\Repository;
namespace common\logic\Feature\FeatureProducer;

use common\logic\AbstractRepository;
use common\logic\Feature\Feature\Model\Feature;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Feature\Feature\Feature;

class FeatureProducerRepository extends AbstractRepository
{

common/logic/Feature/FeatureProducer/Repository/FeatureProducerRepositoryQuery.php → common/logic/Feature/FeatureProducer/FeatureProducerRepositoryQuery.php 파일 보기

@@ -1,10 +1,9 @@
<?php

namespace common\logic\Feature\FeatureProducer\Repository;
namespace common\logic\Feature\FeatureProducer;

use common\logic\AbstractRepositoryQuery;
use common\logic\Feature\Feature\Model\Feature;
use common\logic\Feature\FeatureProducer\Service\FeatureProducerDefinition;
use common\logic\Feature\Feature\Feature;

class FeatureProducerRepositoryQuery extends AbstractRepositoryQuery
{

+ 0
- 35
common/logic/Feature/FeatureProducer/Module/FeatureProducerModule.php 파일 보기

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

namespace common\logic\Feature\FeatureProducer\Module;

use common\logic\AbstractModule;
use common\logic\Feature\FeatureProducer\Repository\FeatureProducerRepository;
use common\logic\Feature\FeatureProducer\Service\FeatureProducerBuilder;
use common\logic\Feature\FeatureProducer\Service\FeatureProducerDefinition;

class FeatureProducerModule extends AbstractModule
{
public function getServices(): array
{
return [
FeatureProducerDefinition::class,
FeatureProducerRepository::class,
FeatureProducerBuilder::class
];
}

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

public function getRepository(): FeatureProducerRepository
{
return FeatureProducerRepository::getInstance();
}

public function getBuilder(): FeatureProducerBuilder
{
return FeatureProducerBuilder::getInstance();
}
}

+ 1
- 1
console/commands/ImportFeaturesController.php 파일 보기

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

namespace console\commands;

use common\logic\Feature\Feature\Module\FeatureModule;
use common\logic\Feature\Feature\FeatureModule;
use yii\console\Controller;

class ImportFeaturesController extends Controller

+ 1
- 1
producer/controllers/CreditController.php 파일 보기

@@ -40,7 +40,7 @@ namespace producer\controllers;

use common\helpers\GlobalParam;
use common\helpers\MeanPayment;
use common\logic\Feature\Feature\Model\Feature;
use common\logic\Feature\Feature\Feature;
use common\logic\Payment\Model\Payment;
use producer\models\CreditForm;
use yii\filters\VerbFilter;

+ 1
- 1
producer/controllers/SiteController.php 파일 보기

@@ -40,7 +40,7 @@ namespace producer\controllers;

use common\forms\ContactForm;
use common\helpers\GlobalParam;
use common\logic\Feature\Feature\Model\Feature;
use common\logic\Feature\Feature\Feature;
use common\logic\Product\Product\Model\Product;
use yii\data\ActiveDataProvider;
use yii\helpers\Html;

+ 2
- 2
producer/views/credit/history.php 파일 보기

@@ -36,8 +36,8 @@
* termes.
*/

use common\logic\Feature\Feature\Model\Feature;
use common\logic\Feature\Feature\Module\FeatureModule;
use common\logic\Feature\Feature\Feature;
use common\logic\Feature\Feature\FeatureModule;
use common\logic\Payment\Module\PaymentModule;
use yii\grid\GridView;


Loading…
취소
저장