Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DeniedIframe.php
Go to the documentation of this file.
1 <?php
8 
10 {
14  protected $resultRawFactory;
15 
20  public function __construct(
21  \Magento\Backend\App\Action\Context $context,
22  \Magento\Framework\Controller\Result\RawFactory $resultRawFactory
23  ) {
24  parent::__construct($context);
25  $this->resultRawFactory = $resultRawFactory;
26  }
27 
33  protected function _getDeniedIframe()
34  {
35  return '<script>parent.window.location = \''
36  . $this->_helper->getHomePageUrl() . '\';</script>';
37  }
38 
44  public function execute()
45  {
47  $resultRaw = $this->resultRawFactory->create();
48  return $resultRaw->setContents($this->_getDeniedIframe());
49  }
50 }
__construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\Controller\Result\RawFactory $resultRawFactory)