Ejemplo n.º 1
0
 /**
  * @param \Magento\Framework\App\Resource $resource
  * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
  * @param \Magento\Catalog\Model\Resource\Category\CollectionFactory $categoryCollectionFactory
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Catalog\Model\Config $catalogConfig
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  */
 public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Model\Resource\Category\CollectionFactory $categoryCollectionFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Config $catalogConfig, \Magento\Framework\Event\ManagerInterface $eventManager)
 {
     $this->_categoryFactory = $categoryFactory;
     $this->_categoryCollectionFactory = $categoryCollectionFactory;
     $this->_storeManager = $storeManager;
     $this->_catalogConfig = $catalogConfig;
     $this->_eventManager = $eventManager;
     parent::__construct($resource);
 }
Ejemplo n.º 2
0
 /**
  * Class constructor
  *
  * @param \Magento\Framework\App\Resource $resource
  * @param \Magento\Eav\Model\Config $eavConfig
  */
 public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Eav\Model\Config $eavConfig)
 {
     $this->_eavConfig = $eavConfig;
     parent::__construct($resource);
 }