Success.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Multishipping checkout success information
  8. *
  9. * @author Magento Core Team <core@magentocommerce.com>
  10. */
  11. namespace Magento\Multishipping\Block\Checkout;
  12. /**
  13. * @api
  14. * @since 100.0.2
  15. */
  16. class Success extends \Magento\Multishipping\Block\Checkout\AbstractMultishipping
  17. {
  18. /**
  19. * @param \Magento\Framework\View\Element\Template\Context $context
  20. * @param \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping
  21. * @param array $data
  22. */
  23. public function __construct(
  24. \Magento\Framework\View\Element\Template\Context $context,
  25. \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping,
  26. array $data = []
  27. ) {
  28. parent::__construct($context, $multishipping, $data);
  29. $this->_isScopePrivate = true;
  30. }
  31. /**
  32. * @return array|bool|string
  33. */
  34. public function getOrderIds()
  35. {
  36. $ids = $this->_session->getOrderIds();
  37. if ($ids && is_array($ids)) {
  38. return $ids;
  39. }
  40. return false;
  41. }
  42. /**
  43. * @param int $orderId
  44. * @return string
  45. */
  46. public function getViewOrderUrl($orderId)
  47. {
  48. return $this->getUrl('sales/order/view/', ['order_id' => $orderId, '_secure' => true]);
  49. }
  50. /**
  51. * @return string
  52. */
  53. public function getContinueUrl()
  54. {
  55. return $this->_storeManager->getStore()->getBaseUrl();
  56. }
  57. }