Explorar el Código

Merge branch 'develop'

develop
Fabien Normand hace 3 años
padre
commit
d64a8822c6
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. +6
    -1
      Controller/AbstractAdminController.php

+ 6
- 1
Controller/AbstractAdminController.php Ver fichero

@@ -466,7 +466,12 @@ abstract class AbstractAdminController extends EaAbstractCrudController

public function deleteEntity(EntityManagerInterface $entityManager, $entityInstance): void
{
$entityManager->delete($entityInstance);
if($this->isInstanceOf(StatusInterface::class)){
$entityInstance->setStatus(-1);
$entityManager->update($entityInstance);
}else{
$entityManager->delete($entityInstance);
}
$entityManager->flush();
$this->get(FlashBagTranslator::class)->add('success', 'deleted', $this->getTranslationEntityName());
}

Cargando…
Cancelar
Guardar