当前位置: 首页>>代码示例>>PHP>>正文


PHP AbstractCollection::__construct方法代码示例

本文整理汇总了PHP中Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractCollection::__construct方法的具体用法?PHP AbstractCollection::__construct怎么用?PHP AbstractCollection::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection的用法示例。


在下文中一共展示了AbstractCollection::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * @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\Review\Helper\Data $reviewData
  * @param \Magento\Review\Model\Rating\Option\VoteFactory $voteFactory
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param mixed $connection
  * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
  */
 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\Review\Helper\Data $reviewData, \Magento\Review\Model\Rating\Option\VoteFactory $voteFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\DB\Adapter\AdapterInterface $connection = null, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null)
 {
     $this->_reviewData = $reviewData;
     $this->_voteFactory = $voteFactory;
     $this->_storeManager = $storeManager;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:18,代码来源:Collection.php

示例2: __construct

 /**
  * @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\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\ConfigurableProduct\Model\Product\Type\Configurable $catalogProductTypeConfigurable
  * @param \Magento\Catalog\Helper\Data $catalogData
  * @param \Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Attribute $resource
  * @param \Magento\Framework\DB\Adapter\AdapterInterface $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\Store\Model\StoreManagerInterface $storeManager, \Magento\ConfigurableProduct\Model\Product\Type\Configurable $catalogProductTypeConfigurable, \Magento\Catalog\Helper\Data $catalogData, \Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Attribute $resource, \Magento\Framework\DB\Adapter\AdapterInterface $connection = null)
 {
     $this->_storeManager = $storeManager;
     $this->_productTypeConfigurable = $catalogProductTypeConfigurable;
     $this->_catalogData = $catalogData;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:19,代码来源:Collection.php

示例3: __construct

 /**
  * @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\Catalog\Model\ResourceModel\Product\Collection $productResource
  * @param \Magento\Customer\Model\ResourceModel\Customer $customerResource
  * @param \Magento\Sales\Model\ResourceModel\Order\Collection $orderResource
  * @param \Magento\Framework\DB\Adapter\AdapterInterface $connection
  * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
  */
 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\Catalog\Model\ResourceModel\Product\Collection $productResource, \Magento\Customer\Model\ResourceModel\Customer $customerResource, \Magento\Sales\Model\ResourceModel\Order\Collection $orderResource, \Magento\Framework\DB\Adapter\AdapterInterface $connection = null, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null)
 {
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
     $this->productResource = $productResource;
     $this->customerResource = $customerResource;
     $this->orderResource = $orderResource;
 }
开发者ID:dragonsword007008,项目名称:magento2,代码行数:18,代码来源:Collection.php

示例4: __construct

 /**
  * @param EntityFactory $entityFactory
  * @param Logger $logger
  * @param FetchStrategy $fetchStrategy
  * @param EventManager $eventManager
  * @param string $mainTable
  * @param string $resourceModel
  * @throws \Magento\Framework\Exception\LocalizedException
  */
 public function __construct(EntityFactory $entityFactory, Logger $logger, FetchStrategy $fetchStrategy, EventManager $eventManager, $mainTable, $resourceModel)
 {
     $this->_init($this->document, $resourceModel);
     $this->setMainTable(true);
     $this->setMainTable($this->_resource->getTable($mainTable));
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, null, null);
     $this->_setIdFieldName($this->getResource()->getIdFieldName());
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:17,代码来源:SearchResult.php

示例5: __construct

 /**
  * @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\Catalog\Model\ResourceModel\Product\Option\Value\CollectionFactory $optionValueCollectionFactory
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Framework\Model\Entity\MetadataPool $metadataPool
  * @param JoinProcessorInterface $joinProcessor
  * @param \Magento\Framework\DB\Adapter\AdapterInterface $connection
  * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
  * @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\Catalog\Model\ResourceModel\Product\Option\Value\CollectionFactory $optionValueCollectionFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Model\Entity\MetadataPool $metadataPool, JoinProcessorInterface $joinProcessor, \Magento\Framework\DB\Adapter\AdapterInterface $connection = null, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null)
 {
     $this->_optionValueCollectionFactory = $optionValueCollectionFactory;
     $this->_storeManager = $storeManager;
     $this->metadataPool = $metadataPool;
     $this->joinProcessor = $joinProcessor;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:koliaGI,项目名称:magento2,代码行数:21,代码来源:Collection.php

示例6: __construct

 /**
  * @param EntityFactory $entityFactory
  * @param Logger $logger
  * @param FetchStrategy $fetchStrategy
  * @param EventManager $eventManager
  * @param string $mainTable
  * @param string $resourceModel
  * @throws \Magento\Framework\Exception\LocalizedException
  */
 public function __construct(EntityFactory $entityFactory, Logger $logger, FetchStrategy $fetchStrategy, EventManager $eventManager, $mainTable, $resourceModel)
 {
     $this->_init('Magento\\Framework\\View\\Element\\UiComponent\\DataProvider\\Document', $resourceModel);
     $this->setMainTable(true);
     $this->setMainTable($this->_resource->getTable($mainTable));
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, null, null);
     $this->_setIdFieldName($this->getResource()->getIdFieldName());
 }
开发者ID:koliaGI,项目名称:magento2,代码行数:17,代码来源:SearchResult.php

示例7: __construct

 /**
  * @param \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param null|\Zend_Db_Adapter_Abstract $mainTable
  * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $eventPrefix
  * @param string $eventObject
  * @param string $resourceModel
  * @param string $model
  * @param string|null $connection
  * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
  *
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, $mainTable, $eventPrefix, $eventObject, $resourceModel, $model = 'Magento\\Sales\\Model\\ResourceModel\\Grid\\Document', $connection = null, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null)
 {
     $this->_eventPrefix = $eventPrefix;
     $this->_eventObject = $eventObject;
     $this->_init($model, $resourceModel);
     $this->setMainTable($mainTable);
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:23,代码来源:Collection.php

示例8: __construct

 /**
  * @constructor
  * @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 null $connection
  * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
  * @param array $fixture
  */
 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\Framework\DB\Adapter\AdapterInterface $connection = null, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null, array $fixture = [])
 {
     $this->setModel('Magento\\Framework\\DataObject');
     $this->setResourceModel('Magento\\Mtf\\Util\\Generate\\Repository\\RepositoryResource');
     $resource = $this->getResource();
     $resource->setFixture($fixture);
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:18,代码来源:TableCollection.php

示例9: __construct

 /**
  * @param \Magento\Framework\Data\Collection\EntityFactoryInterface    $entityFactory
  * @param \Psr\Log\LoggerInterface                                     $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\ResourceModel\Db\AbstractDb              $resource
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Store\Model\StoreManagerInterface $storeManager, $connection = null, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null)
 {
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
     $this->_storeManager = $storeManager;
     if ($storeViewId = $this->_storeManager->getStore()->getId()) {
         $this->_storeViewId = $storeViewId;
     }
 }
开发者ID:JakeSharp,项目名称:Bannerslider-Magento2,代码行数:16,代码来源:Collection.php

示例10: __construct

 /**
  * Constructor
  *
  * @param EntityFactoryInterface $entityFactory
  * @param LoggerInterface        $logger
  * @param FetchStrategyInterface $fetchStrategy
  * @param EventManagerInterface  $eventManager
  * @param null                   $index
  */
 public function __construct(EntityFactoryInterface $entityFactory, LoggerInterface $logger, FetchStrategyInterface $fetchStrategy, EventManagerInterface $eventManager, $index = null)
 {
     /** @var \Mirasvit\Search\Model\Index\External\Wordpress\Post\Index $index */
     $this->index = $index;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager);
     $this->setConnection($this->index->getConnection());
     $this->setModel('\\Mirasvit\\Search\\Model\\Index\\External\\Wordpress\\Post\\Item');
     $this->_initSelect();
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:18,代码来源:Collection.php

示例11: __construct

 /**
  * @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\Framework\Locale\ListsInterface $localeLists
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  * @param \Magento\Directory\Model\ResourceModel\CountryFactory $countryFactory
  * @param \Magento\Framework\Stdlib\ArrayUtils $arrayUtils
  * @param \Magento\Framework\Locale\ResolverInterface $localeResolver
  * @param \Magento\Framework\App\Helper\AbstractHelper $helperData
  * @param mixed $connection
  * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
  * @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\Framework\Locale\ListsInterface $localeLists, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Directory\Model\ResourceModel\CountryFactory $countryFactory, \Magento\Framework\Stdlib\ArrayUtils $arrayUtils, \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Framework\App\Helper\AbstractHelper $helperData, \Magento\Framework\DB\Adapter\AdapterInterface $connection = null, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null)
 {
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
     $this->_scopeConfig = $scopeConfig;
     $this->_localeLists = $localeLists;
     $this->_localeResolver = $localeResolver;
     $this->_countryFactory = $countryFactory;
     $this->_arrayUtils = $arrayUtils;
     $this->helperData = $helperData;
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:25,代码来源:Collection.php

示例12: __construct

 /**
  * @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\Framework\Stdlib\DateTime $dateTime
  * @param mixed $connection
  * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
  */
 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\Framework\Stdlib\DateTime $dateTime,
     \Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
     \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
 ) {
     $this->dateTime = $dateTime;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:razbakov,项目名称:magento2,代码行数:21,代码来源:Collection.php

示例13: __construct

 /**
  * @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\Customer\Model\ResourceModel\Customer $customerResource
  * @param \Magento\Eav\Helper\Data $eavHelper
  * @param mixed $connection
  * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
  */
 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\Customer\Model\ResourceModel\Customer $customerResource,
     \Magento\Eav\Helper\Data $eavHelper,
     \Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
     \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
 ) {
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
     $this->_eavHelper = $eavHelper;
     $this->_customerResource = $customerResource;
 }
开发者ID:razbakov,项目名称:magento2,代码行数:24,代码来源:Collection.php

示例14: __construct

 /**
  * @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\Framework\Notification\MessageList $messageList
  * @param mixed $connection
  * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
  */
 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\Framework\Notification\MessageList $messageList, \Magento\Framework\DB\Adapter\AdapterInterface $connection = null, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null)
 {
     $this->_messageList = $messageList;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:14,代码来源:Collection.php

示例15: __construct

 public function __construct(\Ess\M2ePro\Helper\Factory $helperFactory, \Ess\M2ePro\Model\ActiveRecord\Factory $activeRecordFactory, \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\DB\Adapter\AdapterInterface $connection = null, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null)
 {
     $this->helperFactory = $helperFactory;
     $this->activeRecordFactory = $activeRecordFactory;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:6,代码来源:AbstractCollection.php


注:本文中的Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。