Exemplo n.º 1
0
 /**
  * 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();
 }
Exemplo n.º 2
0
 /**
  * Index action
  *
  * @return $this
  */
 public function execute()
 {
     $resultRedirect = $this->resultRedirectFactory->create();
     return $resultRedirect->setPath('/');
 }