Kaynağa Gözat

Intégartion app order

packProduct
Fab 3 yıl önce
ebeveyn
işleme
b874239008
2 değiştirilmiş dosya ile 10 ekleme ve 4 silme
  1. +2
    -2
      Controller/Setting/SettingAdminController.php
  2. +8
    -2
      Transformer/Order/OrderShopTransformer.php

+ 2
- 2
Controller/Setting/SettingAdminController.php Dosyayı Görüntüle

@@ -61,7 +61,7 @@ class SettingAdminController extends SovSettingController

if ($entity) {
$form = $this->createForm($formClass, $entity);
dump($request);
$form->handleRequest($request);

if ($form->isSubmitted() && $form->isValid()) {
@@ -109,4 +109,4 @@ class SettingAdminController extends SovSettingController
]
);
}
}
}

+ 8
- 2
Transformer/Order/OrderShopTransformer.php Dosyayı Görüntüle

@@ -3,12 +3,14 @@
namespace Lc\CaracoleBundle\Transformer\Order;

use App\Entity\Order\OrderShop;
use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator;
use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
use Lc\CaracoleBundle\Resolver\OrderShopResolver;
use Lc\CaracoleBundle\Solver\Order\OrderShopSolver;
use Lc\CaracoleBundle\Solver\Price\PriceSolver;
use Lc\SovBundle\Model\User\UserInterface;
use Lc\SovBundle\Translation\TranslatorAdmin;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

class OrderShopTransformer
{
@@ -16,13 +18,16 @@ class OrderShopTransformer
protected OrderShopSolver $orderShopSolver;
protected OrderShopResolver $orderShopResolver;
protected TranslatorAdmin $translatorAdmin;
protected UrlGeneratorInterface $urlGenerator;

public function __construct(PriceSolver $priceSolver, OrderShopSolver $orderShopSolver, OrderShopResolver $orderShopResolver, TranslatorAdmin $translatorAdmin)

public function __construct(PriceSolver $priceSolver, OrderShopSolver $orderShopSolver, OrderShopResolver $orderShopResolver, TranslatorAdmin $translatorAdmin, UrlGeneratorInterface $urlGenerator)
{
$this->priceSolver = $priceSolver;
$this->orderShopSolver = $orderShopSolver;
$this->orderShopResolver = $orderShopResolver;
$this->translatorAdmin = $translatorAdmin;
$this->urlGenerator = $urlGenerator;
}

// getOrderDatas
@@ -98,7 +103,7 @@ class OrderShopTransformer
{
$data = array();
foreach ($order->getOrderPayments() as $orderPayment) {
dump($orderPayment->getEditable());
$data[$orderPayment->getId()] = array(
'id' => $orderPayment->getId(),
'reference' => $orderPayment->getReference(),
@@ -181,6 +186,7 @@ class OrderShopTransformer
'type' => $orderDocument->getType(),
'isSent' => $orderDocument->getIsSent(),
'orderReference' => $order->getReference(),
'link' => $this->urlGenerator->generate('document_download', ['id'=> $orderDocument->getId()])
);
}
return $data;

Yükleniyor…
İptal
Kaydet