This commit is contained in:
Julie Lenaerts 2022-02-25 13:59:05 +01:00
parent c416f1ef6d
commit 530297bc67

View File

@ -11,7 +11,6 @@ declare(strict_types=1);
namespace Chill\ThirdPartyBundle\Serializer\Normalizer; namespace Chill\ThirdPartyBundle\Serializer\Normalizer;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\ThirdPartyBundle\Entity\ThirdParty; use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Chill\ThirdPartyBundle\Entity\ThirdPartyCategory; use Chill\ThirdPartyBundle\Entity\ThirdPartyCategory;
@ -53,12 +52,12 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
'text' => $this->translatableStringHelper->localize($el->getName()), 'text' => $this->translatableStringHelper->localize($el->getName()),
'type' => 'thirdparty_category', 'type' => 'thirdparty_category',
]; ];
} else { }
return [ return [
'text' => $el, 'text' => $el,
'type' => 'thirdparty_kind', 'type' => 'thirdparty_kind',
]; ];
}
}, $thirdParty->getTypesAndCategories()), }, $thirdParty->getTypesAndCategories()),
'profession' => $this->normalizer->normalize($thirdParty->getProfession(), $format, $context), 'profession' => $this->normalizer->normalize($thirdParty->getProfession(), $format, $context),
'address' => $this->normalizer->normalize($thirdParty->getAddress(), $format, ['address_rendering' => 'short']), 'address' => $this->normalizer->normalize($thirdParty->getAddress(), $format, ['address_rendering' => 'short']),