Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
History.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
13 
14 class History extends \Magento\Framework\App\Action\Action implements OrderInterface, HttpGetActionInterface
15 {
19  protected $resultPageFactory;
20 
25  public function __construct(
26  Context $context,
28  ) {
29  $this->resultPageFactory = $resultPageFactory;
30  parent::__construct($context);
31  }
32 
38  public function execute()
39  {
41  $resultPage = $this->resultPageFactory->create();
42  $resultPage->getConfig()->getTitle()->set(__('My Orders'));
43 
44  $block = $resultPage->getLayout()->getBlock('customer.account.link.back');
45  if ($block) {
46  $block->setRefererUrl($this->_redirect->getRefererUrl());
47  }
48  return $resultPage;
49  }
50 }
_redirect($path, $arguments=[])
Definition: Action.php:167
__()
Definition: __.php:13
$block
Definition: block.php:8
__construct(Context $context, PageFactory $resultPageFactory)
Definition: History.php:25