This will help handling the CSRF protection token and use symfony HTML generation layer.
Also a FormView instance is generated for each tag because we need to render a form for each tag and FormView are not reusable.
$tags = $this->get('wallabag_core.tag_repository')
->findAllFlatTagsWithNbEntries($this->getUser()->getId());
+ $renameForms = [];
+ foreach ($tags as $tag) {
+ $renameForms[$tag['id']] = $this->createForm(RenameTagType::class, new Tag())->createView();
+ }
+
return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [
'tags' => $tags,
+ 'renameForms' => $renameForms,
]);
}