}', name: 'app_collection')] public function index(Collection $collection, EntityManagerInterface $em): Response { $repo = $em->getRepository(Bibliography::class); $bibliographies = $repo->findAllByCollection($collection->getId()); $collection->setBibliographies($bibliographies); return $this->render('collection/index.html.twig', [ 'controller_name' => 'CollectionController', 'record' => $collection, ]); } #[Route('/collection', name: 'app_collection_landing')] public function landing(EntityManagerInterface $em): Response { $repo = $em->getRepository(Collection::class); $records = $repo->findBy([], ['modifiedAt' => 'DESC']); $count = count($records); $records = array_slice($records, 0, 15); return $this->render('collection/landing.html.twig', [ 'controller_name' => 'CollectionController', 'records' => $records, 'count' => $count, ]); } }