Przeglądaj źródła

[Backoffice] Duplication de fiche : slug mis à jour

feature/export_comptable
Fab 4 lat temu
rodzic
commit
8c7f2cb1f2
2 zmienionych plików z 6 dodań i 1 usunięć
  1. +1
    -1
      ShopBundle/Model/SluggableTrait.php
  2. +5
    -0
      ShopBundle/Services/UtilsProcess.php

+ 1
- 1
ShopBundle/Model/SluggableTrait.php Wyświetl plik

@@ -17,7 +17,7 @@ trait SluggableTrait
return $this->slug;
}

public function setSlug(string $slug): self
public function setSlug(?string $slug): self
{
$this->slug = $slug;


+ 5
- 0
ShopBundle/Services/UtilsProcess.php Wyświetl plik

@@ -16,6 +16,7 @@ use Lc\ShopBundle\Context\PointSaleInterface;
use Lc\ShopBundle\Context\ProductFamilyInterface;
use Lc\ShopBundle\Context\ProductFamilyUtilsInterface;
use Lc\ShopBundle\Context\ReminderInterface;
use Lc\ShopBundle\Context\SluggableInterface;
use Lc\ShopBundle\Context\TaxRateInterface;
use Lc\ShopBundle\Context\UnitInterface;
use Lc\ShopBundle\Context\UserInterface;
@@ -62,6 +63,10 @@ class UtilsProcess
$this->em->persist($newAddress);
}

if($newEntity instanceof SluggableInterface){
$newEntity->setTitle($newEntity->getTitle().' ');
}

$this->em->persist($newEntity);
if($flush){
$this->em->flush();

Ładowanie…
Anuluj
Zapisz