Pārlūkot izejas kodu

Refactor services

feature/export_comptable
Fab pirms 4 gadiem
vecāks
revīzija
ce958eab70
2 mainītis faili ar 8 papildinājumiem un 7 dzēšanām
  1. +2
    -0
      ShopBundle/Services/Order/OrderUtils.php
  2. +6
    -7
      ShopBundle/Twig/BridgeTwigExtension.php

+ 2
- 0
ShopBundle/Services/Order/OrderUtils.php Parādīt failu

@@ -23,7 +23,9 @@ use Lc\ShopBundle\Model\Document;
use Lc\ShopBundle\Form\Backend\Order\OrderReductionCreditType;
use Lc\ShopBundle\Model\Product;
use Lc\ShopBundle\Model\ProductFamily;
use Lc\ShopBundle\Services\DocumentUtils;
use Lc\ShopBundle\Services\Price\OrderShopPriceUtils;
use Lc\ShopBundle\Services\UserUtils;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\Security;


+ 6
- 7
ShopBundle/Twig/BridgeTwigExtension.php Parādīt failu

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

namespace Lc\ShopBundle\Twig;

use Lc\ShopBundle\Context\MerchantUtilsInterface;
use Lc\ShopBundle\Context\PageInterface;
use Lc\ShopBundle\Form\Frontend\NewsletterType;
use Lc\ShopBundle\Services\TaxRateUtils;
@@ -14,14 +15,12 @@ use Twig\TwigFunction;
class BridgeTwigExtension extends AbstractExtension
{
private $utils ;
private $taxRateUtils ;
private $unitUtils ;
private $merchantUtils ;

public function __construct(Utils $utils, TaxRateUtils $taxRateUtils, UnitUtils $unitUtils)
public function __construct(Utils $utils, MerchantUtilsInterface $merchantUtils)
{
$this->utils = $utils ;
$this->taxRateUtils = $taxRateUtils ;
$this->unitUtils = $unitUtils ;
$this->merchantUtils = $merchantUtils ;
}

public function getFunctions()
@@ -48,12 +47,12 @@ class BridgeTwigExtension extends AbstractExtension

public function getUnitsList()
{
return $this->unitUtils->getUnitsList() ;
return $this->utils->getUnitsList() ;
}

public function getTaxRatesList()
{
return $this->taxRateUtils->getTaxRatesList() ;
return $this->merchantUtils->getTaxRatesList() ;
}

public function getElementByDevAlias($devAlias, $class = PageInterface::class)

Notiek ielāde…
Atcelt
Saglabāt