Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
48 | private function createTranslationBasedQueryBuilder($locale): QueryBuilder |
||
49 | { |
||
50 | $queryBuilder = $this->createQueryBuilder('o') |
||
51 | ->leftJoin('o.translations', 'translation') |
||
52 | ; |
||
53 | |||
54 | if (null !== $locale) { |
||
55 | $queryBuilder |
||
56 | ->andWhere('translation.locale = :locale') |
||
57 | ->setParameter('locale', $locale) |
||
58 | ; |
||
59 | } |
||
60 | |||
61 | return $queryBuilder; |
||
62 | } |
||
63 | } |
||
64 |