Use statements & update translation

This commit is contained in:
Jeremy Benoist
2016-10-11 21:45:43 +02:00
parent 8c61fd12b1
commit b0de88f75d
7 changed files with 28 additions and 34 deletions

View File

@ -90,15 +90,15 @@ class TagController extends Controller
$flatTags = [];
foreach ($tags as $key => $tag) {
foreach ($tags as $tag) {
$nbEntries = $this->getDoctrine()
->getRepository('WallabagCoreBundle:Entry')
->countAllEntriesByUserIdAndTagId($this->getUser()->getId(), $tag['id']);
->countAllEntriesByUserIdAndTagId($this->getUser()->getId(), $tag->getId());
$flatTags[] = [
'id' => $tag['id'],
'label' => $tag['label'],
'slug' => $tag['slug'],
'id' => $tag->getId(),
'label' => $tag->getLabel(),
'slug' => $tag->getSlug(),
'nbEntries' => $nbEntries,
];
}