Fix tags count in menu

Move enable cache for Tag in the Entity because function `find*` should return result and not a Query
This commit is contained in:
Jeremy Benoist
2016-09-25 11:21:13 +02:00
parent 9d7dd6b0d2
commit faa86e06ba
4 changed files with 46 additions and 46 deletions

View File

@ -84,16 +84,11 @@ class TagController extends Controller
{
$tags = $this->getDoctrine()
->getRepository('WallabagCoreBundle:Tag')
->findAllTags($this->getUser()->getId())
->getQuery()
->getResult();
->findAllTagsWithEntries($this->getUser()->getId());
return $this->render(
'WallabagCoreBundle:Tag:tags.html.twig',
[
'tags' => $tags,
]
);
return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [
'tags' => $tags,
]);
}
/**
@ -127,13 +122,10 @@ class TagController extends Controller
}
}
return $this->render(
'WallabagCoreBundle:Entry:entries.html.twig',
[
'form' => null,
'entries' => $entries,
'currentPage' => $page,
]
);
return $this->render('WallabagCoreBundle:Entry:entries.html.twig',[
'form' => null,
'entries' => $entries,
'currentPage' => $page,
]);
}
}