diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/TagController.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/TagController.php | 33 |
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 | |||
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 | } | ||