forked from wallabag/wallabag
Merge pull request #1292 from wallabag/v2-tags-route
Add tags list display
This commit is contained in:
31
src/Wallabag/CoreBundle/Controller/TagController.php
Normal file
31
src/Wallabag/CoreBundle/Controller/TagController.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Controller;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class TagController extends Controller
|
||||
{
|
||||
/**
|
||||
* Shows tags for current user.
|
||||
*
|
||||
* @Route("/tag/list", name="tag")
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function showTagAction()
|
||||
{
|
||||
$tags = $this->getDoctrine()
|
||||
->getRepository('WallabagCoreBundle:Tag')
|
||||
->findTags($this->getUser()->getId());
|
||||
|
||||
return $this->render(
|
||||
'WallabagCoreBundle:Tag:tags.html.twig',
|
||||
array(
|
||||
'tags' => $tags
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user