Exemplo n.º 1
0
 /**
  * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\App\Resource $resource
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\App\Resource $resource)
 {
     $this->_setIdFieldName('primary_id');
     parent::__construct($entityFactory, $logger, $fetchStrategy, $resource->getConnection('review_read'));
     $this->_summaryTable = $resource->getTableName('review_entity_summary');
     $this->_select->from($this->_summaryTable);
     $this->setItemObjectClass('Magento\\Review\\Model\\Review\\Summary');
 }
Exemplo n.º 2
0
 /**
  * @param EntityFactory $entityFactory
  * @param Logger $logger
  * @param FetchStrategyInterface $fetchStrategy
  * @param ManagerInterface $eventManager
  * @param Order $resource
  * @param \Magento\Store\Model\Resource\Store\CollectionFactory $storeCollectionFactory
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  */
 public function __construct(EntityFactory $entityFactory, Logger $logger, FetchStrategyInterface $fetchStrategy, ManagerInterface $eventManager, Order $resource, \Magento\Store\Model\Resource\Store\CollectionFactory $storeCollectionFactory, StoreManagerInterface $storeManager)
 {
     $this->_eventManager = $eventManager;
     $this->_orderResource = $resource;
     $this->_storeCollectionFactory = $storeCollectionFactory;
     $this->_storeManager = $storeManager;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $this->_orderResource->getReadConnection());
 }
 /**
  * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Eav\Model\Config $eavConfig
  * @param \Magento\Framework\App\Resource $resource
  * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
  * @param \Magento\Eav\Model\Resource\Helper $resourceHelper
  * @param \Magento\Framework\Validator\UniversalFactory $universalFactory
  * @param mixed $connection
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Eav\Model\Config $eavConfig, \Magento\Framework\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Eav\Model\Resource\Helper $resourceHelper, \Magento\Framework\Validator\UniversalFactory $universalFactory, $connection = null)
 {
     $this->_eventManager = $eventManager;
     $this->_eavConfig = $eavConfig;
     $this->_resource = $resource;
     $this->_eavEntityFactory = $eavEntityFactory;
     $this->_resourceHelper = $resourceHelper;
     $this->_universalFactory = $universalFactory;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $connection);
     $this->_construct();
     $this->setConnection($this->getEntity()->getReadConnection());
     $this->_prepareStaticFields();
     $this->_initSelect();
 }
Exemplo n.º 4
0
 /**
  * @param \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory
  * @param \Magento\Framework\Logger $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Zend_Db_Adapter_Abstract $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, \Magento\Framework\Logger $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null)
 {
     $this->_eventManager = $eventManager;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $connection);
     $this->_construct();
     $this->_resource = $resource;
     $this->setConnection($this->getResource()->getReadConnection());
     $this->_initSelect();
 }