瀏覽代碼

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

develop
Charly 3 年之前
父節點
當前提交
f7eb6ac69f
共有 2 個檔案被更改,包括 6 行新增2 行删除
  1. +6
    -1
      Controller/AbstractAdminController.php
  2. +0
    -1
      Repository/Site/NewsStore.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());
}

+ 0
- 1
Repository/Site/NewsStore.php 查看文件

@@ -18,7 +18,6 @@ class NewsStore extends AbstractStore implements NewsStoreInterface

public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
{
$query->orderBy('id');
return $query;
}


Loading…
取消
儲存