aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/TagRepository.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-02-10 17:41:28 +0100
committerThomas Citharel <tcit@tcit.fr>2016-02-10 17:41:28 +0100
commit567421af5019bf5937aa2b4214b405d87a1f1f86 (patch)
treed1f8d3ad8593a3a6f33662217a81cbd731287fc9 /src/Wallabag/CoreBundle/Repository/TagRepository.php
parentae5b37ef2e52c06182bc6edb14f6b3aae381ddb4 (diff)
downloadwallabag-567421af5019bf5937aa2b4214b405d87a1f1f86.tar.gz
wallabag-567421af5019bf5937aa2b4214b405d87a1f1f86.tar.zst
wallabag-567421af5019bf5937aa2b4214b405d87a1f1f86.zip
remove tag from entry #1377
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/TagRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/TagRepository.php16
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}