aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/TagController.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/TagController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/TagController.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php
new file mode 100644
index 00000000..89284231
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Controller/TagController.php
@@ -0,0 +1,33 @@
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}