| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | public function onCitySelected(FormEvent $event): void |
||
| 23 | { |
||
| 24 | $form = $event->getForm(); |
||
| 25 | $data = $event->getData(); |
||
| 26 | $city = $data->getCity(); |
||
| 27 | |||
| 28 | if ($city) { |
||
| 29 | $form->add('district', EntityType::class, [ |
||
| 30 | 'class' => 'App\Entity\District', |
||
| 31 | 'placeholder' => 'placeholder.select_district', |
||
| 32 | 'choice_label' => 'name', |
||
| 33 | 'attr' => [ |
||
| 34 | 'class' => 'form-control', |
||
| 35 | ], |
||
| 36 | 'required' => false, |
||
| 37 | 'label' => 'label.district', |
||
| 38 | 'choices' => $city->getDistricts(), |
||
| 39 | ]); |
||
| 43 |