66 CustomerAddressHelper $customerAddressHelper,
73 $this->_customerAddressHelper = $customerAddressHelper;
78 parent::__construct($context, $multishipping,
$data);
86 $this->pageConfig->getTitle()->set(
87 __(
'Change Billing Address') .
' - ' . $this->pageConfig->getTitle()->getDefault()
89 return parent::_prepareLayout();
102 $filter = $this->filterBuilder->setField(
'parent_id')
103 ->setValue($this->_multishipping->getCustomer()->getId())
104 ->setConditionType(
'eq')
106 $addresses = (array)($this->addressRepository->getList(
107 $this->searchCriteriaBuilder->addFilters([$filter])->create()
125 $formatTypeRenderer = $this->_customerAddressHelper->getFormatTypeRenderer(
'html');
127 if ($formatTypeRenderer) {
128 $result = $formatTypeRenderer->renderArray($this->addressMapper->toFlatArray(
$address));
141 return $address->getId() == $this->_multishipping->getCustomer()->getDefaultBilling();
152 return $address->getId() == $this->_multishipping->getCustomer()->getDefaultShipping();
163 return $this->
getUrl(
'*/*/editAddress', [
'id' => $address->getId()]);
174 return $this->
getUrl(
'*/*/setBilling', [
'id' => $address->getId()]);
182 return $this->
getUrl(
'*/*/newBilling');
190 return $this->
getUrl(
'*/checkout/billing');
isAddressDefaultShipping(\Magento\Customer\Api\Data\AddressInterface $address)
getData($key='', $index=null)
getAddressAsHtml(\Magento\Customer\Api\Data\AddressInterface $address)
isAddressDefaultBilling(\Magento\Customer\Api\Data\AddressInterface $address)
getUrl($route='', $params=[])
getEditAddressUrl(\Magento\Customer\Api\Data\AddressInterface $address)
getSetAddressUrl(\Magento\Customer\Api\Data\AddressInterface $address)
setData($key, $value=null)
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping, CustomerAddressHelper $customerAddressHelper, \Magento\Customer\Model\Address\Mapper $addressMapper, AddressRepositoryInterface $addressRepository, \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, \Magento\Framework\Api\FilterBuilder $filterBuilder, array $data=[])