Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CurrentCustomerAddress.php
Go to the documentation of this file.
1 <?php
7 
10 
15 {
19  protected $currentCustomer;
20 
24  protected $accountManagement;
25 
30  public function __construct(
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 }
__construct(CurrentCustomer $currentCustomer, AccountManagementInterface $accountManagement)