Fix #1994
* Remove unused method in tag repository
{
$tags = $this->getDoctrine()
->getRepository('WallabagCoreBundle:Tag')
{
$tags = $this->getDoctrine()
->getRepository('WallabagCoreBundle:Tag')
- ->findTags($this->getUser()->getId());
+ ->findAllTags($this->getUser()->getId());
return $this->render(
'WallabagCoreBundle:Tag:tags.html.twig',
return $this->render(
'WallabagCoreBundle:Tag:tags.html.twig',
namespace Wallabag\CoreBundle\Repository;
use Doctrine\ORM\EntityRepository;
namespace Wallabag\CoreBundle\Repository;
use Doctrine\ORM\EntityRepository;
-use Pagerfanta\Adapter\DoctrineORMAdapter;
-use Pagerfanta\Pagerfanta;
class TagRepository extends EntityRepository
{
class TagRepository extends EntityRepository
{
->where('e.user = :userId')->setParameter('userId', $userId);
}
->where('e.user = :userId')->setParameter('userId', $userId);
}
- /**
- * Find Tags and return a Pager.
- *
- * @param int $userId
- *
- * @return Pagerfanta
- */
- public function findTags($userId)
- {
- $qb = $this->getQbForAllTags($userId);
-
- $pagerAdapter = new DoctrineORMAdapter($qb);
-
- return new Pagerfanta($pagerAdapter);
- }
-
{% block content %}
<div class="results">
{% block content %}
<div class="results">
- <div class="nb-results">{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}</div>
+ <div class="nb-results">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
{% block content %}
<div class="results clearfix">
{% block content %}
<div class="results clearfix">
- <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}</div>
+ <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
</div>
<br />
<ul class="row data">
</div>
<br />
<ul class="row data">