BackendSession.php 968 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Signifyd\Model\QuoteSession\Adminhtml;
  7. use Magento\Backend\Model\Session\Quote as BackendQuoteSession;
  8. use Magento\Signifyd\Model\QuoteSession\QuoteSessionInterface;
  9. /**
  10. * Implementation of QuoteSessionInterface for Magento backend checkout.
  11. */
  12. class BackendSession implements QuoteSessionInterface
  13. {
  14. /**
  15. * @var BackendQuoteSession
  16. */
  17. private $backendQuoteSession;
  18. /**
  19. * BackendSession constructor.
  20. *
  21. * Class uses backend session for retrieving quote.
  22. *
  23. * @param BackendQuoteSession $backendQuoteSession
  24. */
  25. public function __construct(BackendQuoteSession $backendQuoteSession)
  26. {
  27. $this->backendQuoteSession = $backendQuoteSession;
  28. }
  29. /**
  30. * @inheritdoc
  31. */
  32. public function getQuote()
  33. {
  34. return $this->backendQuoteSession->getQuote();
  35. }
  36. }