addresses: edit address (WIP)

This commit is contained in:
nobohan
2021-06-15 21:03:50 +02:00
parent 000ae6c2cb
commit 35d35c9f40
7 changed files with 137 additions and 39 deletions

View File

@@ -14,8 +14,15 @@ class AddressNormalizer implements NormalizerAwareInterface, NormalizerInterface
public function normalize($address, string $format = null, array $context = [])
{
$data['address_id'] = $address->getId();
$data['text'] = $address->getStreet().', '.$address->getBuildingName();
$data['text'] = $address->getStreet().', '.$address->getStreetNumber();
$data['postcode']['name'] = $address->getPostCode()->getName();
$data['country']['name'] = $address->getPostCode()->getCountry()->getName();
$data['floor'] = $address->getFloor();
$data['steps'] = $address->getSteps();
$data['flat'] = $address->getBuildingName();
$data['buildingName'] = $address->getFlat();
$data['distribution'] = $address->getDistribution();
$data['extra'] = $address->getExtra();
return $data;
}
@@ -25,5 +32,5 @@ class AddressNormalizer implements NormalizerAwareInterface, NormalizerInterface
return $data instanceof Address;
}
}