58 \
Magento\Directory\Model\CountryFactory $countryFactory,
59 \
Magento\Customer\Api\AddressMetadataInterface $metadataService,
63 $this->_elementFactory = $elementFactory;
64 $this->_countryFactory = $countryFactory;
65 $this->_addressMetadataService = $metadataService;
67 parent::__construct($context,
$data);
68 $this->_isScopePrivate =
true;
104 $format = $countryFormat ? $countryFormat->getFormat() : $this->
getType()->getDefaultFormat();
125 $countryFormat =
false;
129 $countryFormat = $country->getFormat($this->
getType()->getCode());
131 $format = $countryFormat ? $countryFormat->getFormat() : $this->
getType()->getDefaultFormat();
143 switch ($this->
getType()->getCode()) {
158 $attributesMetadata = $this->_addressMetadataService->getAllAttributesMetadata();
160 foreach ($attributesMetadata as $attributeMetadata) {
161 if (!$attributeMetadata->isVisible()) {
166 $data[
'country'] = $this->_countryFactory->create()->loadByCode(
173 $dataModel = $this->_elementFactory->create($attributeMetadata,
$value,
'customer_address');
174 $value = $dataModel->outputValue($dataFormat);
175 if ($attributeMetadata->getFrontendInput() ==
'multiline') {
178 foreach (
$values as $k => $v) {
186 if ($this->
getType()->getEscapeHtml()) {
192 return $this->filterManager->template(
$format, [
'variables' =>
$data]);
elseif(isset( $params[ 'redirect_parent']))
getFormat(AddressModelInterface $address=null)
escapeHtml($data, $allowedTags=null)
render(AddressModelInterface $address, $format=null)
__construct(\Magento\Framework\View\Element\Context $context, ElementFactory $elementFactory, \Magento\Directory\Model\CountryFactory $countryFactory, \Magento\Customer\Api\AddressMetadataInterface $metadataService, Mapper $addressMapper, array $data=[])
getFormatArray($addressAttributes=null)
renderArray($addressAttributes, $format=null)
setType(\Magento\Framework\DataObject $type)