7 declare(strict_types=1);
26 private $resultJsonFactory;
31 private $productCollectionFactory;
44 $this->resultJsonFactory = $jsonFactory;
45 $this->productCollectionFactory = $productCollectionFactory;
46 parent::__construct($context);
66 'is_active' =>
$product->getStatus(),
71 $resultJson = $this->resultJsonFactory->create();
72 return $resultJson->setData(
$option);
__construct(\Magento\Framework\Controller\Result\JsonFactory $jsonFactory, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, \Magento\Backend\App\Action\Context $context)