mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
migrating legacy to symfony
This commit is contained in:
parent
2b9fe72b39
commit
9d50517cea
31 changed files with 1825 additions and 20 deletions
35
src/WallabagBundle/Repository/EntriesRepository.php
Normal file
35
src/WallabagBundle/Repository/EntriesRepository.php
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
namespace WallabagBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* EntriesRepository
|
||||
*
|
||||
* This class was generated by the Doctrine ORM. Add your own custom
|
||||
* repository methods below.
|
||||
*/
|
||||
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')
|
||||
->select('e')
|
||||
->where('e.isRead = 0')
|
||||
->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