Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-customer
Helper
Session
CurrentCustomerAddress.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Customer\Helper\Session
;
7
8
use
Magento\Customer\Api\AccountManagementInterface
;
9
use
Magento\Customer\Api\Data\AddressInterface
;
10
14
class
CurrentCustomerAddress
15
{
19
protected
$currentCustomer
;
20
24
protected
$accountManagement
;
25
30
public
function
__construct
(
31
CurrentCustomer
$currentCustomer
,
32
AccountManagementInterface
$accountManagement
33
) {
34
$this->currentCustomer =
$currentCustomer
;
35
$this->accountManagement =
$accountManagement
;
36
}
37
43
public
function
getDefaultBillingAddress
()
44
{
45
return
$this->accountManagement->getDefaultBillingAddress($this->currentCustomer->getCustomerId());
46
}
47
53
public
function
getDefaultShippingAddress
()
54
{
55
return
$this->accountManagement->getDefaultShippingAddress(
56
$this->currentCustomer->getCustomerId()
57
);
58
}
59
}
Magento\Customer\Helper\Session\CurrentCustomer
Definition:
CurrentCustomer.php:19
Magento\Customer\Helper\Session\CurrentCustomerAddress\getDefaultShippingAddress
getDefaultShippingAddress()
Definition:
CurrentCustomerAddress.php:53
Magento\Customer\Api\Data\AddressInterface
Definition:
AddressInterface.php:15
Magento\Customer\Helper\Session\CurrentCustomerAddress\$accountManagement
$accountManagement
Definition:
CurrentCustomerAddress.php:24
Magento\Customer\Helper\Session\CurrentCustomerAddress\getDefaultBillingAddress
getDefaultBillingAddress()
Definition:
CurrentCustomerAddress.php:43
Magento\Customer\Helper\Session\CurrentCustomerAddress\$currentCustomer
$currentCustomer
Definition:
CurrentCustomerAddress.php:19
Magento\Customer\Helper\Session
Definition:
CurrentCustomer.php:6
Magento\Customer\Helper\Session\CurrentCustomerAddress\__construct
__construct(CurrentCustomer $currentCustomer, AccountManagementInterface $accountManagement)
Definition:
CurrentCustomerAddress.php:30
Magento\Customer\Api\AccountManagementInterface
Definition:
AccountManagementInterface.php:17
Magento\Customer\Helper\Session\CurrentCustomerAddress
Definition:
CurrentCustomerAddress.php:14