mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-27 03:21:01 +00:00
Add RenameForm as tag list view parameters.
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.
This commit is contained in:
parent
be326a22f9
commit
b846c1e4d0
1 changed files with 6 additions and 0 deletions
|
@ -88,8 +88,14 @@ class TagController extends Controller
|
|||
$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,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue