浏览代码

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

develop
Guillaume 3 年前
父节点
当前提交
4f77be1897
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. +6
    -1
      Controller/AbstractAdminController.php

+ 6
- 1
Controller/AbstractAdminController.php 查看文件

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

正在加载...
取消
保存