/** * View product gallery action * * @return \Magento\Framework\Controller\ResultInterface */ public function execute() { $result = null; if (!$this->_initProduct()) { $store = $this->getRequest()->getQuery('store'); if (isset($store) && !$this->getResponse()->isRedirect()) { $result = $this->resultRedirectFactory->create(); $result->setPath(''); } elseif (!$this->getResponse()->isRedirect()) { $result = $this->resultForwardFactory->create(); $result->forward('noroute'); } } return $result ?: $this->resultPageFactory->create(); }
/** * Index action * * @return $this */ public function execute() { $resultRedirect = $this->resultRedirectFactory->create(); return $resultRedirect->setPath('/'); }