| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | private function createTranslationBasedQueryBuilder($locale): QueryBuilder |
||
| 39 | { |
||
| 40 | $queryBuilder = $this->createQueryBuilder('o') |
||
| 41 | ->addSelect('translation') |
||
| 42 | ->leftJoin('o.translations', 'translation') |
||
| 43 | ; |
||
| 44 | |||
| 45 | if (null !== $locale) { |
||
| 46 | $queryBuilder |
||
| 47 | ->andWhere('translation.locale = :locale') |
||
| 48 | ->setParameter('locale', $locale) |
||
| 49 | ; |
||
| 50 | } |
||
| 51 | |||
| 52 | return $queryBuilder; |
||
| 53 | } |
||
| 54 | } |
||
| 55 |