Add Collector entity

This commit is contained in:
2024-11-06 11:12:16 +01:00
parent f7efe03340
commit 47bed0bacc
9 changed files with 584 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Controller;
use App\Entity\Bibliography;
use App\Entity\Collection;
use App\Entity\Collector;
use App\Form\BibliographyType;
//use App\Security\Voter\VocabVoter;
use Doctrine\ORM\EntityManagerInterface;
@@ -20,8 +21,11 @@ class BibliographyController extends AbstractController
{
$repo = $em->getRepository(Collection::class);
$collections = $repo->findAllByBibliography($bibliography->getId());
$repo = $em->getRepository(Collector::class);
$collectors = $repo->findAllByBibliography($bibliography->getId());
$bibliography->setCollections($collections);
$bibliography->setCollectors($collectors);
return $this->render('bibliography/index.html.twig', [
'controller_name' => 'BibliographyController',