Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Gallery.php
Go to the documentation of this file.
1 <?php
8 
12 
14 {
19 
23  protected $resultPageFactory;
24 
32  public function __construct(
33  Context $context,
34  Result\ForwardFactory $resultForwardFactory,
36  ) {
37  $this->resultForwardFactory = $resultForwardFactory;
38  $this->resultPageFactory = $resultPageFactory;
39  parent::__construct($context);
40  }
41 
47  public function execute()
48  {
49  $result = null;
50  if (!$this->_initProduct()) {
51  $store = $this->getRequest()->getQuery('store');
52  if (isset($store) && !$this->getResponse()->isRedirect()) {
53  $result = $this->resultRedirectFactory->create();
54  $result->setPath('');
55  } elseif (!$this->getResponse()->isRedirect()) {
56  $result = $this->resultForwardFactory->create();
57  $result->forward('noroute');
58  }
59  }
60  return $result ?: $this->resultPageFactory->create();
61  }
62 }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17