Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function findByNamePart(string $phrase, ?string $locale = null): array |
||
37 | { |
||
38 | return $this->createQueryBuilder('o') |
||
39 | ->innerJoin('o.translations', 'translation', 'WITH', 'translation.locale = :locale') |
||
40 | ->andWhere('translation.name LIKE :name') |
||
41 | ->setParameter('name', '%'.$phrase.'%') |
||
42 | ->setParameter('locale', $locale) |
||
43 | ->getQuery() |
||
44 | ->getResult() |
||
45 | ; |
||
46 | } |
||
47 | } |
||
48 |