]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Controller/TagController.php
Add tags list display
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / TagController.php
1 <?php
2
3 namespace Wallabag\CoreBundle\Controller;
4
5 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7 use Symfony\Component\HttpFoundation\Request;
8 use Wallabag\CoreBundle\Entity\Tag;
9
10 class TagController extends Controller
11 {
12 /**
13 * Shows tags for current user.
14 *
15 * @Route("/tag/list", name="tag")
16 *
17 * @return \Symfony\Component\HttpFoundation\Response
18 */
19 public function showTagAction()
20 {
21 $tags = $this->getDoctrine()
22 ->getRepository('WallabagCoreBundle:Tag')
23 ->findTags($this->getUser()->getId());
24
25 return $this->render(
26 'WallabagCoreBundle:Tag:tags.html.twig',
27 array(
28 'tags' => $tags
29 )
30 );
31 }
32
33 }