Explorar el Código

[Backend] API adresses : correctif

develop
Guillaume hace 3 años
padre
commit
a47ce16cbb
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. +8
    -1
      ShopBundle/Controller/AddressApiController.php

+ 8
- 1
ShopBundle/Controller/AddressApiController.php Ver fichero

@@ -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
] ;

Cargando…
Cancelar
Guardar