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
6 namespace Magento\Checkout\Block;
7 
9 {
13  protected $_orderFactory;
14 
21  public function __construct(
22  \Magento\Framework\View\Element\Template\Context $context,
23  \Magento\Sales\Model\OrderFactory $orderFactory,
24  array $data = []
25  ) {
26  $this->_orderFactory = $orderFactory;
27  parent::__construct($context, $data);
28  }
29 
33  public function getRealOrderId()
34  {
36  $order = $this->_orderFactory->create()->load($this->getLastOrderId());
37  return $order->getIncrementId();
38  }
39 }
$order
Definition: order.php:55
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Sales\Model\OrderFactory $orderFactory, array $data=[])
Definition: Success.php:21