|
|
|
|
|
|
|
|
|
|
|
|
|
|
$codesPostaux = $city->codesPostaux ; |
|
|
$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[] = [ |
|
|
$return[] = [ |
|
|
'label' => '<span class="city">'.$city->nom.'</span> <span class="zip">'.$codesPostaux[0].'</span>', |
|
|
|
|
|
|
|
|
'label' => $label, |
|
|
'city' => $city->nom, |
|
|
'city' => $city->nom, |
|
|
'value' => $city->code |
|
|
'value' => $city->code |
|
|
] ; |
|
|
] ; |