Beispiel #1
0
 /**
  * Adapter constructor.
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  * @param \Magento\Catalog\Model\Category $catalogCategory
  * @param \Magento\Framework\App\Request\Http $request
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Search\Model\QueryFactory $queryFactory
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Catalog\Model\Layer\Resolver $layerResolver
  * @param \Boxalino\Intelligence\Helper\Data $bxHelperData
  */
 public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Catalog\Model\Category $catalogCategory, \Magento\Framework\App\Request\Http $request, \Magento\Framework\Registry $registry, \Magento\Search\Model\QueryFactory $queryFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Layer\Resolver $layerResolver, \Magento\Framework\App\Response\Http $response, \Boxalino\Intelligence\Helper\Data $bxHelperData, \Magento\Eav\Model\Config $config)
 {
     $this->_modelConfig = $config;
     $this->response = $response;
     $this->bxHelperData = $bxHelperData;
     $this->scopeConfig = $scopeConfig;
     $this->catalogCategory = $catalogCategory;
     $this->request = $request;
     $this->registry = $registry;
     $this->queryFactory = $queryFactory;
     $this->storeManager = $storeManager;
     $libPath = __DIR__ . '/../../Lib';
     require_once $libPath . '/BxClient.php';
     \com\boxalino\bxclient\v1\BxClient::LOAD_CLASSES($libPath);
     if ($this->bxHelperData->isPluginEnabled()) {
         $this->initializeBXClient();
     }
 }
Beispiel #2
0
 /**
  * BxIndexer constructor.
  * @param StoreManagerInterface $storeManager
  * @param LoggerInterface $logger
  * @param Filesystem $filesystem
  * @param \Magento\Catalog\Helper\Product\Flat\Indexer $productHelper
  * @param \Magento\Framework\App\ResourceConnection $rs
  * @param \Magento\Framework\App\DeploymentConfig $deploymentConfig
  * @param ProductFactory $productFactory
  * @param \Magento\Framework\App\ProductMetadata $productMetaData
  */
 public function __construct(StoreManagerInterface $storeManager, LoggerInterface $logger, Filesystem $filesystem, \Magento\Catalog\Helper\Product\Flat\Indexer $productHelper, \Magento\Framework\App\ResourceConnection $rs, \Magento\Framework\App\DeploymentConfig $deploymentConfig, ProductFactory $productFactory, \Magento\Framework\App\ProductMetadata $productMetaData, \Magento\Indexer\Model\Indexer $indexer, \Magento\Framework\App\Response\Http $response)
 {
     $this->_response = $response;
     $this->indexerModel = $indexer;
     $this->storeManager = $storeManager;
     $this->logger = $logger;
     $this->filesystem = $filesystem;
     $this->productHelper = $productHelper;
     $this->rs = $rs;
     $this->deploymentConfig = $deploymentConfig;
     $this->productFactory = $productFactory;
     $this->productMetaData = $productMetaData;
     $this->bxGeneral = new BxGeneral();
     $libPath = __DIR__ . '/../../Lib';
     require_once $libPath . '/BxClient.php';
     \com\boxalino\bxclient\v1\BxClient::LOAD_CLASSES($libPath);
 }