Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Success.php
Go to the documentation of this file.
1 <?php
8 
13 
17 class Success extends Action
18 {
22  private $state;
23 
27  private $multishipping;
28 
34  public function __construct(
35  Context $context,
36  State $state,
37  Multishipping $multishipping
38  ) {
39  $this->state = $state;
40  $this->multishipping = $multishipping;
41 
42  parent::__construct($context);
43  }
44 
50  public function execute()
51  {
52  if (!$this->state->getCompleteStep(State::STEP_OVERVIEW)) {
53  $this->_redirect('*/*/addresses');
54  return;
55  }
56 
57  $this->_view->loadLayout();
58  $ids = $this->multishipping->getOrderIds();
59  $this->_eventManager->dispatch('multishipping_checkout_controller_success_action', ['order_ids' => $ids]);
60  $this->_view->renderLayout();
61  }
62 }
_redirect($path, $arguments=[])
Definition: Action.php:167
__construct(Context $context, State $state, Multishipping $multishipping)
Definition: Success.php:34