optimize code and ingest docs

This commit is contained in:
team 1
2026-02-17 14:12:24 +01:00
parent f528a1c395
commit 812f2bf265
11 changed files with 156 additions and 282 deletions

View File

@@ -7,6 +7,7 @@ namespace App\Repository;
use App\Entity\IngestProfile;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\Uid\Uuid;
class IngestProfileRepository extends ServiceEntityRepository
{
@@ -28,4 +29,17 @@ class IngestProfileRepository extends ServiceEntityRepository
{
return $this->findOneBy(['active' => true]);
}
public function remove(string $id): void
{
$entity = $this->find($id);
if (!$entity instanceof IngestProfile) {
return;
}
$em = $this->getEntityManager();
$em->remove($entity);
$em->flush();
}
}