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-configurable-product
Controller
Adminhtml
Product
Attribute
GetAttributes.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\ConfigurableProduct\Controller\Adminhtml\Product\Attribute
;
8
9
use
Magento\Framework\App\Action\HttpGetActionInterface
;
10
use
Magento\Backend\App\Action
;
11
use
Magento\ConfigurableProduct\Model\AttributesListInterface
;
12
13
class
GetAttributes
extends
Action
implements
HttpGetActionInterface
14
{
20
const
ADMIN_RESOURCE
=
'Magento_Catalog::products'
;
21
27
protected
$storeManager
;
28
32
protected
$jsonHelper
;
33
40
public
function
__construct
(
41
Action
\
Context
$context,
42
\
Magento
\
Store
\Model\
StoreManagerInterface
$storeManager
,
43
\
Magento
\Framework\Json\Helper\Data
$jsonHelper
,
44
AttributesListInterface
$attributesList
45
) {
46
$this->storeManager =
$storeManager
;
47
$this->jsonHelper =
$jsonHelper
;
48
$this->attributesList = $attributesList;
49
parent::__construct($context);
50
}
51
57
public
function
execute
()
58
{
59
$this->storeManager->setCurrentStore(\
Magento
\
Store
\Model\
Store::ADMIN_CODE
);
60
$attributes
= $this->attributesList->getAttributes($this->
getRequest
()->getParam(
'attributes'
));
61
$this->
getResponse
()->representJson($this->jsonHelper->jsonEncode(
$attributes
));
62
}
63
}
Magento\ConfigurableProduct\Controller\Adminhtml\Product\Attribute
Definition:
CreateOptions.php:7
Magento\CatalogSearch\Model\Indexer\Fulltext\Store
Definition:
Store.php:17
Magento\Framework\App\Action\AbstractAction\getResponse
getResponse()
Definition:
AbstractAction.php:70
Magento\Framework\App\Action\HttpGetActionInterface
Definition:
HttpGetActionInterface.php:16
Magento\ConfigurableProduct\Controller\Adminhtml\Product\Attribute\GetAttributes
Definition:
GetAttributes.php:13
Magento\ConfigurableProduct\Controller\Adminhtml\Product\Attribute\GetAttributes\$jsonHelper
$jsonHelper
Definition:
GetAttributes.php:32
Magento\Framework\App\Action\AbstractAction\getRequest
getRequest()
Definition:
AbstractAction.php:60
Magento\Backend\App\Action
Definition:
Action.php:17
Magento\Store\Model\StoreManagerInterface
Definition:
StoreManagerInterface.php:17
Magento\ConfigurableProduct\Controller\Adminhtml\Product\Attribute\GetAttributes\__construct
__construct(Action\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Json\Helper\Data $jsonHelper, AttributesListInterface $attributesList)
Definition:
GetAttributes.php:40
Magento\ConfigurableProduct\Controller\Adminhtml\Product\Attribute\GetAttributes\$storeManager
$storeManager
Definition:
GetAttributes.php:27
Magento
$attributes
$attributes
Definition:
matrix.phtml:13
Magento\Store\Model\Store\ADMIN_CODE
const ADMIN_CODE
Definition:
Store.php:103
Magento\Backend\App\Action\Context
Definition:
Context.php:25
Magento\ConfigurableProduct\Model\AttributesListInterface
Definition:
AttributesListInterface.php:12
Magento\Backend\App\Action
Definition:
Context.php:6
Magento\ConfigurableProduct\Controller\Adminhtml\Product\Attribute\GetAttributes\execute
execute()
Definition:
GetAttributes.php:57
Magento\ConfigurableProduct\Controller\Adminhtml\Product\Attribute\GetAttributes\ADMIN_RESOURCE
const ADMIN_RESOURCE
Definition:
GetAttributes.php:20