forked from wallabag/wallabag
Added route to list entries with annotations
This commit is contained in:
committed by
Jeremy Benoist
parent
9a6146d2ef
commit
dce50ddb79
@ -142,6 +142,21 @@ class EntryRepository extends EntityRepository
|
||||
return $this->sortQueryBuilder($this->getRawBuilderForUntaggedByUser($userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve entries with annotations for a user.
|
||||
*
|
||||
* @param int $userId
|
||||
*
|
||||
* @return QueryBuilder
|
||||
*/
|
||||
public function getBuilderForAnnotationsByUser($userId)
|
||||
{
|
||||
return $this
|
||||
->getSortedQueryBuilderByUser($userId)
|
||||
->innerJoin('e.annotations', 'a')
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve untagged entries for a user.
|
||||
*
|
||||
@ -579,6 +594,10 @@ class EntryRepository extends EntityRepository
|
||||
$qb->leftJoin('e.tags', 't');
|
||||
$qb->andWhere('t.id is null');
|
||||
break;
|
||||
case 'with_annotations':
|
||||
$qb->leftJoin('e.annotations', 'a');
|
||||
$qb->andWhere('a.id is not null');
|
||||
break;
|
||||
}
|
||||
|
||||
$ids = $qb->getQuery()->getArrayResult();
|
||||
|
||||
Reference in New Issue
Block a user