Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog
Controller
Product
Gallery.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Catalog\Controller\Product
;
8
9
use
Magento\Framework\App\Action\Context
;
10
use
Magento\Framework\Controller\Result
;
11
use
Magento\Framework\View\Result\PageFactory
;
12
13
class
Gallery
extends
\Magento\Catalog\Controller\Product
14
{
18
protected
$resultForwardFactory
;
19
23
protected
$resultPageFactory
;
24
32
public
function
__construct
(
33
Context
$context,
34
Result\ForwardFactory
$resultForwardFactory
,
35
PageFactory
$resultPageFactory
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
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Framework\Controller\Result
Definition:
Forward.php:7
Magento\Catalog\Controller\Product\Gallery\$resultPageFactory
$resultPageFactory
Definition:
Gallery.php:23
Magento\Framework\App\Action\AbstractAction\getResponse
getResponse()
Definition:
AbstractAction.php:70
elseif
elseif(isset( $params[ 'redirect_parent']))
Definition:
iframe.phtml:17
Magento\Catalog\Controller\Product\Gallery\execute
execute()
Definition:
Gallery.php:47
Magento\Framework\App\Action\AbstractAction\getRequest
getRequest()
Definition:
AbstractAction.php:60
Magento\Framework\View\Result\PageFactory
Definition:
PageFactory.php:19
Magento\Catalog\Controller\Product
Definition:
CompareTest.php:7
Magento\Catalog\Controller\Product\Gallery\__construct
__construct(Context $context, Result\ForwardFactory $resultForwardFactory, PageFactory $resultPageFactory)
Definition:
Gallery.php:32
$store
$store
Definition:
payment_configuration_rollback.php:33
Magento\Framework\App\Action\Context
Definition:
Context.php:24
Magento\Catalog\Controller\Product\Gallery
Definition:
Gallery.php:13
Magento\Catalog\Controller\Product\Gallery\$resultForwardFactory
$resultForwardFactory
Definition:
Gallery.php:18
Magento\Catalog\Controller\Product
Definition:
Product.php:13