Add AbstractController, implement flash message handling, and refactor repositories

This commit is contained in:
2025-03-05 21:01:57 +01:00
parent 29bc74fe4f
commit 0ccce51af8
18 changed files with 111 additions and 21 deletions

View File

@@ -36,4 +36,13 @@ class CandidateRepository extends ServiceEntityRepository
->setParameter('name', $name)
->getQuery()->getOneOrNullResult();
}
public function save(Candidate $candidate, bool $flush = true): void
{
$this->getEntityManager()->persist($candidate);
if (true === $flush) {
$this->getEntityManager()->flush();
}
}
}