mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-16 18:01:38 +00:00
Merge branch '2.6'
# Conflicts: # src/Repository/EntryRepository.php # src/Twig/WallabagExtension.php # src/Wallabag/CoreBundle/Resources/views/Entry/_card_actions.html.twig # src/Wallabag/CoreBundle/Resources/views/Entry/_card_list.html.twig # tests/Twig/WallabagExtensionTest.php
This commit is contained in:
commit
2272d3da66
9 changed files with 68 additions and 32 deletions
|
@ -148,6 +148,12 @@ class AnnotationRepository extends ServiceEntityRepository
|
|||
->getResult();
|
||||
}
|
||||
|
||||
public function getCountBuilderByUser($userId = null)
|
||||
{
|
||||
return $this->createQueryBuilder('e')
|
||||
->andWhere('e.user = :userId')->setParameter('userId', $userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a query builder to used by other getBuilderFor* method.
|
||||
*
|
||||
|
|
|
@ -228,21 +228,6 @@ class EntryRepository extends ServiceEntityRepository
|
|||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve entries with annotations count for a user.
|
||||
*
|
||||
* @param int $userId
|
||||
*
|
||||
* @return QueryBuilder
|
||||
*/
|
||||
public function getCountBuilderForAnnotationsByUser($userId)
|
||||
{
|
||||
return $this
|
||||
->getQueryBuilderByUser($userId)
|
||||
->innerJoin('e.annotations', 'a')
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve untagged entries for a user.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue