Sfoglia il codice sorgente

Merge branch 'develop'

develop
Guillaume 3 anni fa
parent
commit
732ad82a0c
2 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. +6
    -1
      Controller/AbstractAdminController.php
  2. +0
    -1
      Repository/Site/NewsStore.php

+ 6
- 1
Controller/AbstractAdminController.php Vedi File

@@ -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 Vedi File

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

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


Loading…
Annulla
Salva