mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-04-11 07:23:44 +00:00
Add fields for upsert person
This commit is contained in:
@@ -55,7 +55,7 @@ class AddressRender implements ChillEntityRenderInterface
|
||||
$lines = [];
|
||||
|
||||
if (null !== $addr->getPostcode()) {
|
||||
if ('FR' === $addr->getPostcode()->getCountry()->getCountryCode()) {
|
||||
if ('FR' === $addr->getPostcode()->getCountry()?->getCountryCode()) {
|
||||
$lines[] = $this->renderIntraBuildingLine($addr);
|
||||
$lines[] = $this->renderBuildingLine($addr);
|
||||
$lines[] = $this->renderStreetLine($addr);
|
||||
@@ -102,7 +102,7 @@ class AddressRender implements ChillEntityRenderInterface
|
||||
|
||||
$res = trim($street.', '.$streetNumber, ', ');
|
||||
|
||||
if ('FR' === $addr->getPostcode()->getCountry()->getCountryCode()) {
|
||||
if ('FR' === $addr->getPostcode()?->getCountry()?->getCountryCode()) {
|
||||
$res = trim($streetNumber.', '.$street, ', ');
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ class AddressRender implements ChillEntityRenderInterface
|
||||
$res = null;
|
||||
}
|
||||
|
||||
if ('FR' === $addr->getPostcode()->getCountry()->getCountryCode()) {
|
||||
if ('FR' === $addr->getPostcode()?->getCountry()?->getCountryCode()) {
|
||||
$res = $addr->getBuildingName();
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ class AddressRender implements ChillEntityRenderInterface
|
||||
'{label}' => $addr->getPostcode()->getName(),
|
||||
]);
|
||||
|
||||
if ('FR' === $addr->getPostcode()->getCountry()->getCountryCode()) {
|
||||
if ('FR' === $addr->getPostcode()->getCountry()?->getCountryCode()) {
|
||||
if ('' !== $addr->getDistribution()) {
|
||||
$res = $res.' '.$addr->getDistribution();
|
||||
}
|
||||
@@ -171,6 +171,10 @@ class AddressRender implements ChillEntityRenderInterface
|
||||
|
||||
private function renderCountryLine(Address $addr): ?string
|
||||
{
|
||||
if (null === $addr->getPostcode()?->getCountry()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->translatableStringHelper->localize(
|
||||
$addr->getPostcode()->getCountry()->getName()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user