__construct() public method

Indexer constructor.
public __construct ( Magento\Framework\App\ResourceConnection $resource, Magento\Store\Model\StoreManagerInterface $storeManager, Magento\Framework\EntityManager\MetadataPool $metadataPool )
$resource Magento\Framework\App\ResourceConnection Resource Connection
$storeManager Magento\Store\Model\StoreManagerInterface Store Manager
$metadataPool Magento\Framework\EntityManager\MetadataPool Metadata Pool
 /**
  * InventoryData constructor.
  *
  * @param ResourceConnection          $resource           Database adapter.
  * @param StoreManagerInterface       $storeManager       Store manager.
  * @param MetadataPool                $metadataPool       Metadata Pool
  * @param StockRegistryInterface      $stockRegistry      Stock registry.
  * @param StockConfigurationInterface $stockConfiguration Stock configuration.
  */
 public function __construct(ResourceConnection $resource, StoreManagerInterface $storeManager, MetadataPool $metadataPool, StockRegistryInterface $stockRegistry, StockConfigurationInterface $stockConfiguration)
 {
     $this->stockRegistry = $stockRegistry;
     $this->stockConfiguration = $stockConfiguration;
     parent::__construct($resource, $storeManager, $metadataPool);
 }
Beispiel #2
0
 /**
  * CategoryData constructor.
  *
  * @param \Magento\Framework\App\ResourceConnection     $resource     Connection Resource
  * @param \Magento\Store\Model\StoreManagerInterface    $storeManager The store manager
  * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool Metadata Pool
  * @param \Magento\Eav\Model\Config                     $eavConfig    EAV Configuration
  */
 public function __construct(ResourceConnection $resource, StoreManagerInterface $storeManager, MetadataPool $metadataPool, Config $eavConfig)
 {
     $this->eavConfig = $eavConfig;
     parent::__construct($resource, $storeManager, $metadataPool);
 }
 /**
  * AbstractAttributeData constructor.
  *
  * @param \Magento\Framework\App\ResourceConnection     $resource     Resource Connection
  * @param \Magento\Store\Model\StoreManagerInterface    $storeManager Store Manager
  * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool Entity Metadata Pool
  * @param string                                        $entityType   Entity Type
  */
 public function __construct(ResourceConnection $resource, StoreManagerInterface $storeManager, MetadataPool $metadataPool, $entityType = null)
 {
     $this->entityTypeId = $entityType;
     parent::__construct($resource, $storeManager, $metadataPool);
 }