Bladeren bron

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Guillaume 3 jaren geleden
bovenliggende
commit
8e0b286675
2 gewijzigde bestanden met toevoegingen van 10 en 4 verwijderingen
  1. +2
    -2
      Controller/Setting/SettingAdminController.php
  2. +8
    -2
      Transformer/Order/OrderShopTransformer.php

+ 2
- 2
Controller/Setting/SettingAdminController.php Bestand weergeven

@@ -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 Bestand weergeven

@@ -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;

Laden…
Annuleren
Opslaan