Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
20 | public function listAction(Request $request) |
||
21 | { |
||
22 | $query = $request->query; |
||
23 | $repository = $this->doctrine->getRepository($query->get('class')); |
||
24 | |||
25 | if ($repository instanceof ReferenceDataRepositoryInterface) { |
||
26 | $options = $query->get('options', []) + ['dataLocale' => $query->get('dataLocale')]; |
||
27 | |||
28 | $choices = ['results' => $repository->findBySearch($query->get('search'), $options)]; |
||
29 | |||
30 | return new JsonResponse($choices); |
||
31 | } |
||
32 | |||
33 | return parent::listAction($request); |
||
34 | } |
||
35 | } |
||
36 |