@@ -42,8 +42,15 @@ class AddressApiController extends AbstractController | |||
$codesPostaux = $city->codesPostaux ; | |||
if($context == 'frontend') { | |||
$label = '<span class="city">'.$city->nom.'</span> <span class="zip">'.$codesPostaux[0].'</span>' ; | |||
} | |||
else { | |||
$label = $city->nom.' - '.$codesPostaux[0] ; | |||
} | |||
$return[] = [ | |||
'label' => '<span class="city">'.$city->nom.'</span> <span class="zip">'.$codesPostaux[0].'</span>', | |||
'label' => $label, | |||
'city' => $city->nom, | |||
'value' => $city->code | |||
] ; |