Add ability to reset some datas

- annotations
- tags
- entries
This commit is contained in:
Jeremy Benoist
2016-10-01 09:26:32 +02:00
parent e8331dd9e7
commit 206bade58a
18 changed files with 406 additions and 22 deletions

View File

@ -52,6 +52,23 @@ class TagRepository extends EntityRepository
->getArrayResult();
}
/**
* Find all tags.
*
* @param int $userId
*
* @return array
*/
public function findAllTags($userId)
{
return $this->createQueryBuilder('t')
->select('t')
->leftJoin('t.entries', 'e')
->where('e.user = :userId')->setParameter('userId', $userId)
->getQuery()
->getResult();
}
/**
* Used only in test case to get a tag for our entry.
*