58 $this->_addressConfig = $addressConfig;
59 parent::__construct($context,
$data);
71 return $this->currentCustomer->getCustomer();
85 $address = $this->currentCustomerAddress->getDefaultShippingAddress();
87 return __(
'You have not set a default shipping address.');
91 return $this->_getAddressHtml(
$address);
93 return __(
'You have not set a default shipping address.');
105 $address = $this->currentCustomerAddress->getDefaultBillingAddress();
107 return __(
'You have not set a default billing address.');
111 return $this->_getAddressHtml(
$address);
113 return __(
'You have not set a default billing address.');
125 $address = $this->currentCustomerAddress->getDefaultShippingAddress();
127 return $this->_urlBuilder->getUrl(
128 'customer/address/edit',
142 $address = $this->currentCustomerAddress->getDefaultBillingAddress();
144 return $this->_urlBuilder->getUrl(
145 'customer/address/edit',
156 return $this->
getUrl(
'customer/address/');
165 protected function _getAddressHtml(
$address)
168 $renderer = $this->_addressConfig->getFormatByCode(
'html')->getRenderer();
169 return $renderer->renderArray($this->addressMapper->toFlatArray(
$address));
getPrimaryShippingAddressEditUrl()
getPrimaryShippingAddressHtml()
getUrl($route='', $params=[])
getPrimaryBillingAddressHtml()
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer, \Magento\Customer\Helper\Session\CurrentCustomerAddress $currentCustomerAddress, \Magento\Customer\Model\Address\Config $addressConfig, Mapper $addressMapper, array $data=[])
getPrimaryBillingAddressEditUrl()