1 | <?php |
||
20 | class TaxonRepository extends EntityRepository implements TaxonRepositoryInterface |
||
21 | { |
||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | public function findChildren($parentCode, $locale) |
||
26 | { |
||
27 | return $this->createQueryBuilder('o') |
||
28 | ->addSelect('translation') |
||
29 | ->addSelect('child') |
||
30 | ->innerJoin('o.parent', 'parent') |
||
31 | ->innerJoin('o.translations', 'translation', 'WITH', 'translation.locale = :locale') |
||
32 | ->leftJoin('o.children', 'child') |
||
33 | ->andWhere('parent.code = :parentCode') |
||
34 | ->addOrderBy('o.position') |
||
35 | ->setParameter('parentCode', $parentCode) |
||
36 | ->setParameter('locale', $locale) |
||
37 | ->getQuery() |
||
38 | ->getResult() |
||
39 | ; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | public function findOneBySlug($slug, $locale) |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function findByName($name, $locale) |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function findRootNodes() |
||
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | public function findByNamePart($phrase, $locale) |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function createListQueryBuilder() |
||
113 | } |
||
114 |