]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/TagController.php
Merge remote-tracking branch 'origin/master' into 2.4
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / TagController.php
index 70b273e0168052cb00fab9193ec7cf4b5036c1bd..d0155c6018bde6877786e1817a637deee6b18604 100644 (file)
@@ -5,9 +5,9 @@ namespace Wallabag\CoreBundle\Controller;
 use Pagerfanta\Adapter\ArrayAdapter;
 use Pagerfanta\Exception\OutOfRangeCurrentPageException;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\Routing\Annotation\Route;
 use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\CoreBundle\Entity\Tag;
 use Wallabag\CoreBundle\Form\Type\NewTagType;
@@ -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,
         ]);
     }