Details.php 845 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Paypal\Block\Express\Review;
  7. use Magento\Sales\Model\Order\Address;
  8. /**
  9. * Paypal Express Onepage checkout block
  10. *
  11. * @api
  12. * @since 100.0.2
  13. */
  14. class Details extends \Magento\Checkout\Block\Cart\Totals
  15. {
  16. /**
  17. * @var Address
  18. */
  19. protected $_address;
  20. /**
  21. * Return review shipping address
  22. *
  23. * @return Address
  24. */
  25. public function getAddress()
  26. {
  27. if (empty($this->_address)) {
  28. $this->_address = $this->getQuote()->getShippingAddress();
  29. }
  30. return $this->_address;
  31. }
  32. /**
  33. * Return review quote totals
  34. *
  35. * @return array
  36. */
  37. public function getTotals()
  38. {
  39. return $this->getQuote()->getTotals();
  40. }
  41. }