Pārlūkot izejas kodu

Merge branch 'develop'

develop
Fabien Normand pirms 3 gadiem
vecāks
revīzija
d64a8822c6
1 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. +6
    -1
      Controller/AbstractAdminController.php

+ 6
- 1
Controller/AbstractAdminController.php Parādīt failu

@@ -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());
}

Notiek ielāde…
Atcelt
Saglabāt