- $entries = $this->getDoctrine()
- ->getRepository('WallabagCoreBundle:Entry')
- ->$methodBuilder($this->getUser()->getId())
- ->getQuery()
- ->getResult();
+
+ if ($category == 'tag_entries') {
+ $tag = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findOneBySlug($request->query->get('tag'));
+
+ $entries = $this->getDoctrine()
+ ->getRepository('WallabagCoreBundle:Entry')
+ ->findAllByTagId($this->getUser()->getId(), $tag->getId());
+ } else {
+ $entries = $this->getDoctrine()
+ ->getRepository('WallabagCoreBundle:Entry')
+ ->$methodBuilder($this->getUser()->getId())
+ ->getQuery()
+ ->getResult();
+ }