mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
article view, fav list, archive list
This commit is contained in:
parent
9d50517cea
commit
bd9f08157c
7 changed files with 232 additions and 29 deletions
|
@ -13,14 +13,6 @@ use Doctrine\ORM\EntityRepository;
|
|||
*/
|
||||
class EntriesRepository extends EntityRepository
|
||||
{
|
||||
/* public function findUnreadByUser($userId)
|
||||
{
|
||||
return $this->createQueryBuilder('e')
|
||||
->where('e.is_read = 0')
|
||||
->andWhere('e.user_id = :userId')
|
||||
->setParameter('userId', $userId)
|
||||
->getQuery();
|
||||
}*/
|
||||
public function findUnreadByUser($userId)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('e')
|
||||
|
@ -32,4 +24,28 @@ class EntriesRepository extends EntityRepository
|
|||
|
||||
return $qb;
|
||||
}
|
||||
|
||||
public function findArchiveByUser($userId)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('e')
|
||||
->select('e')
|
||||
->where('e.isRead = 1')
|
||||
->andWhere('e.userId =:userId')->setParameter('userId', $userId)
|
||||
->getQuery()
|
||||
->getResult(Query::HYDRATE_ARRAY);
|
||||
|
||||
return $qb;
|
||||
}
|
||||
|
||||
public function findStarredByUser($userId)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('e')
|
||||
->select('e')
|
||||
->where('e.isFav = 1')
|
||||
->andWhere('e.userId =:userId')->setParameter('userId', $userId)
|
||||
->getQuery()
|
||||
->getResult(Query::HYDRATE_ARRAY);
|
||||
|
||||
return $qb;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue