diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-02-10 17:41:28 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2016-02-10 17:41:28 +0100 |
commit | 567421af5019bf5937aa2b4214b405d87a1f1f86 (patch) | |
tree | d1f8d3ad8593a3a6f33662217a81cbd731287fc9 /src/Wallabag/CoreBundle/Repository | |
parent | ae5b37ef2e52c06182bc6edb14f6b3aae381ddb4 (diff) | |
download | wallabag-567421af5019bf5937aa2b4214b405d87a1f1f86.tar.gz wallabag-567421af5019bf5937aa2b4214b405d87a1f1f86.tar.zst wallabag-567421af5019bf5937aa2b4214b405d87a1f1f86.zip |
remove tag from entry #1377
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/TagRepository.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php index c4aeb594..8d9cf85c 100644 --- a/src/Wallabag/CoreBundle/Repository/TagRepository.php +++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php | |||
@@ -51,4 +51,20 @@ class TagRepository extends EntityRepository | |||
51 | ->getQuery() | 51 | ->getQuery() |
52 | ->getResult(); | 52 | ->getResult(); |
53 | } | 53 | } |
54 | |||
55 | /** | ||
56 | * Used only in test case to get a tag for our entry. | ||
57 | * | ||
58 | * @return Tag | ||
59 | */ | ||
60 | public function findOnebyEntryAndLabel($entry, $label) | ||
61 | { | ||
62 | return $this->createQueryBuilder('t') | ||
63 | ->leftJoin('t.entries', 'e') | ||
64 | ->where('e.id = :entryId')->setParameter('entryId', $entry->getId()) | ||
65 | ->andWhere('t.label = :label')->setParameter('label', $label) | ||
66 | ->setMaxResults(1) | ||
67 | ->getQuery() | ||
68 | ->getSingleResult(); | ||
69 | } | ||
54 | } | 70 | } |