]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Controller/TagController.php
Add tags list display
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / TagController.php
CommitLineData
3f3fbef1
NL
1<?php
2
3namespace Wallabag\CoreBundle\Controller;
4
5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7use Symfony\Component\HttpFoundation\Request;
8use Wallabag\CoreBundle\Entity\Tag;
9
10class 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}