66 parent::__construct($context,
$data);
76 return $this->customerRepository->getById($this->customerSession->getCustomerId());
86 return $this->_urlBuilder->getUrl(
'customer/account/edit', [
'_secure' =>
true]);
96 return $this->_urlBuilder->getUrl(
'customer/address/index', [
'_secure' =>
true]);
107 return $this->_urlBuilder->getUrl(
108 'customer/address/edit',
109 [
'_secure' =>
true,
'id' =>
$address->getId()]
120 return $this->_urlBuilder->getUrl(
'customer/order/index', [
'_secure' =>
true]);
130 return $this->_urlBuilder->getUrl(
'review/customer/index', [
'_secure' =>
true]);
140 return $this->_urlBuilder->getUrl(
'customer/wishlist/index', [
'_secure' =>
true]);
150 if ($this->subscription ===
null) {
151 $this->subscription =
152 $this->
_createSubscriber()->loadByCustomerId($this->customerSession->getCustomerId());
165 return $this->
getUrl(
'newsletter/manage');
176 return __(
'You are subscribed to our newsletter.');
179 return __(
'You aren\'t subscribed to our newsletter.');
192 if ($defaultBilling = $this->customerAccountManagement->getDefaultBillingAddress(
$customerId)) {
196 if ($defaultShipping = $this->customerAccountManagement->getDefaultShippingAddress(
$customerId)) {
197 if ($defaultBilling) {
198 if ($defaultBilling->getId() != $defaultShipping->getId()) {
221 if ($this->getRefererUrl()) {
222 return $this->getRefererUrl();
224 return $this->
getUrl(
'customer/account/');
234 return $this->subscriberFactory->create();
$customerAccountManagement
getAddressEditUrl($address)
getUrl($route='', $params=[])
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, CustomerRepositoryInterface $customerRepository, AccountManagementInterface $customerAccountManagement, array $data=[])