*
* @Route("/export/{category}.{format}", name="export_entries", requirements={
* "format": "epub|mobi|pdf|json|xml|txt|csv",
- * "category": "all|unread|starred|archive|tag_entries|untagged|search"
+ * "category": "all|unread|starred|archive|tag_entries|untagged|search|same_domain"
* })
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function getBuilderForSameDomainByUser($userId, $entryId)
{
- dump($entryId);die;
-
- $
+ $queryBuilder = $this->createQueryBuilder('e');
return $this
->getSortedQueryBuilderByUser($userId)
- ->andWhere('e.isArchived = false')
- ;
+ ->andWhere('e.id <> :entryId')->setParameter('entryId', $entryId)
+ ->andWhere(
+ $queryBuilder->expr()->in(
+ 'e.domainName',
+ $this
+ ->createQueryBuilder('e2')
+ ->select('e2.domainName')
+ ->where('e2.id = :entryId')->setParameter('entryId', $entryId)
+ ->getDQL()
+ )
+ );
}
/**