69 $address =
new Address($this->languageId);
71 foreach ($addressComponents as $item)
73 if ($type = $this->
convertTypes($item[
'types'], FieldType::class))
75 $address->setFieldValue((
int)$type, (
string)$item[
'long_name']);
79 $format = FormatService::getInstance()->findDefault($this->languageId);
81 $addressLine1 = StringConverter::convertToStringTemplate(
83 $format->getTemplate(TemplateType::ADDRESS_LINE_1),
84 StringConverter::STRATEGY_TYPE_TEMPLATE,
85 StringConverter::CONTENT_TYPE_TEXT
90 $address->setFieldValue(FieldType::ADDRESS_LINE_1, $addressLine1);